Core Data validateForUpdate
Core Data validateForUpdate
- Subject: Core Data validateForUpdate
- From: "Gerriet M. Denkmann" <email@hidden>
- Date: Sun, 20 Dec 2009 15:19:58 +0700
I have a document based Core Data app.
MyDocument.nib contains an NSTableView bound to an NSArrayController.
There also are "+" and "-" buttons, which send "add:" resp. "remove:" to the array controller.
SomeEntity.m (subclass of NSManagedObject) implements validateForInsert:, validateForUpdate: and validateForDelete: - none of which are ever called. Why?
What I try to accomplish:
SomeEntity has a property called "uniqueKey" and this is (no big surprise) meant to be unique.
When the "UniqueKey" column in my table view gets edited, validateUniqueKey:error: gets called, I check the new value for uniqueness and all is fine.
But hitting the "+" button several times inserts several objects with the same key (Default Value).
What should I do? How to make validateForInsert: get called? 10.6.2.
Kind regards,
Gerriet.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden