> Here is the model: > > ElectronicDocument <-->>TextblockReference<<-->Textblock. TextblockReference > is more than a simple m:n join table. However I have a flattened m:n > relationship between ElectronicDocument (called textblocks) and Textblock > (called documents) across TextblockReference. There are other entities > hanging off TextblockReference: TextblockReferemce<-->>Params<-->>Data.
On 26.04.2011, at 16:17, David Avendasora wrote: >>>> And what should those be for the flattened relationship? >>> >>> I'm guessing that they should be "nullify" or "do nothing" >> >> Yes, only one delete rule should affect a given relationship. In fact, I >> always shy away from (nay, avoid completely) flattened relationships that >> hide objects I am actually interested in. In general, 'one path to the >> object' is the rule I try to follow. > > Absolutely! +1,000,000. > > EOF gets horribly confused if you have multiple paths. Never, never, never > have more than one relationship in an Entity share a FK, or have a FK be a > class attribute because you can set one without setting the other, or set > them independently to different values, try to delete one relationship and > the other still sees it as being valid but the object is long gone. > > Hmmm. That last one sounds familiar... :-) That makes sense and is what caused the problems in the end. I removed the flattened relationship between ElectronicDocument and Textblock from the model and replaced it by a simple cover method in ElectronicDocument.java --> all problems gone. Thanks to "The Davids" :-) ---markus--- _______________________________________________ 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]
