• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Confused with delete rules in EntityModeler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Confused with delete rules in EntityModeler


  • Subject: Re: Confused with delete rules in EntityModeler
  • From: Markus Ruggiero <email@hidden>
  • Date: Wed, 27 Apr 2011 07:17:32 +0200

> 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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Confused with delete rules in EntityModeler (From: Markus Ruggiero <email@hidden>)
 >Re: Confused with delete rules in EntityModeler (From: David Avendasora <email@hidden>)
 >Re: Confused with delete rules in EntityModeler (From: David LeBer <email@hidden>)
 >Re: Confused with delete rules in EntityModeler (From: David Avendasora <email@hidden>)

  • Prev by Date: D2W pull downs for toOne relationships aren't behaving as I'd expect anymore
  • Next by Date: Re: isEntityDeletable being cached in D2WContext in ERMODListPage
  • Previous by thread: Re: Confused with delete rules in EntityModeler
  • Next by thread: [MEETING] WO-NoVA cancelled, see you in May (5/17/2011)
  • Index(es):
    • Date
    • Thread