Delete rules on flattened relationships
Delete rules on flattened relationships
- Subject: Delete rules on flattened relationships
- From: Paul Hoadley <email@hidden>
- Date: Wed, 09 Nov 2011 14:04:13 +1030
Hello,
I was recently reviewing an EO model of mine and noticed a flattened relationship with a Nullify delete rule. I recalled part of an exchange between Davids Avendasora and LeBer earlier this year:
>>> 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.
So the advice is that the intended delete rule(s) should operate on the real relationship chain, not shortcut via the flattened relationship. That's fine, but are Nullify and Do Nothing really interchangeable on a flattened relationship, as it's almost suggested above? It's important because the default is Nullify, so all flattened relationships have that rule unless you change them. But depending on whether that rule is applied before or after the rule(s) applied over the real relationship chain, Nullify might end up giving you the wrong semantics. Shouldn't all flattened relationships have a Do Nothing delete rule (at least by default)?
--
Paul.
http://logicsquad.net/
_______________________________________________
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