Re: Delete rule "deny"
Re: Delete rule "deny"
- Subject: Re: Delete rule "deny"
- From: mmalcolm crawford <email@hidden>
- Date: Mon, 20 Jun 2005 02:10:38 -0700
On Jun 20, 2005, at 1:39 AM, Kaspar Fischer wrote:
So does anybody know how one can prevent an object
from being deleted if the deletion would violate
(on an imaginary "Save" operation) a Deny rule?
You can't. You could, however, simply invoke validateForDelete prior
to attempting to delete (and don't delete if it returns NO)...
"Determines whether the receiver can be deleted in its current state,
returning YES if it can, otherwise NO and in error an NSError that
describes the problem. For example, an object can’t be deleted if it
has a relationship has a “deny” delete rule and that relationship has
a destination object."
<http://developer.apple.com/documentation/Cocoa/Reference/
CoreData_ObjC/Classes/NSManagedObject.html#//apple_ref/doc/uid/
TP30001171-BBCJCJBF>
mmalc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden