On Mar 5, 2009, at 7:15 AM, David Avendasora wrote:

I also get the error if it the relationship is set to "Owns Destination" and the delete rule is "Deny"

Having these two settings, unless I'm missing something, are in direct conflict with each other.

I think if Owns Destination is checked, then the following should automatically happen: 1) Delete Rule should be set to "Cascade" and drop down disabled (anything else is in conflict with Owns Destination). 2) If there is an inverse relationship it should be set to "Required" (not Optional) and the checkbox disabled with a note stating that the relationship is Required by the Owns Destination setting on the inverse relationship.

Am I missing anything?


From the old EOModeler docs:

Owns Destination and Propagate Primary Key
The Owns Destination option lets you specify whether the relationship’s source owns its destination objects. When a source object owns its destination object, for example, as when an Agent object owns its Customer objects, when a destination object (Customer) is removed from the relationship, it is also removed from the data source. Ownership implies that an owned object cannot exist without its owner.


So yes, cascade delete appears to be the only option that makes sense when the owner is deleted. (http://developer.apple.com/documentation/WebObjects/UsingEOModeler/5WorkingWithRelationships/chapter_5_section_2.html )

On a similar note, if you create a to-many relationship in entity modeler, by default the delete rule is set to nullify but the reverse to-one is set as mandatory... it seems to me that the default should be deny delete. Model validation seems appropriate too. I filed it a while back (http://issues.objectstyle.org/jira/browse/WOL-924) but it has no votes so far... 0:-)

Ramsey
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to