On 21/03/2013, at 9:26 AM, Chuck Hill <[email protected]> wrote:

> On 2013-03-20, at 3:08 PM, Paul Hoadley wrote:
> 
>> On 21/03/2013, at 1:36 AM, Chuck Hill <[email protected]> wrote:
>> 
>>> On 2013-03-20, at 3:12 AM, Paul Hoadley wrote:
>>> 
>>>> On 20/03/2013, at 2:49 PM, Chuck Hill <[email protected]> wrote:
>>>> 
>>>>> David Avendasora had an improved delegate that I think he mentioned 
>>>>> committing to Wonder.  Maybe he has not gotten around to it?  Logically, 
>>>>> you can't have mandatory circular relationships without deferred 
>>>>> constraint handling.
>>>> 
>>>> Unless I've not looked closely enough at my own model, half of the circle 
>>>> here is optional, which should be alright.  (Shouldn't it?)  Does the 
>>>> ERXEntityDependencyOrderingDelegate look to see whether the relationships 
>>>> are optional/mandatory and make allowances, or does it just get as far as 
>>>> seeing that there's a cycle?
>>> 
>>> My version just stopped when it saw a cycle.  I think.  I have not used it 
>>> in years.
>> 
>> Yeah, it seems to.  I meant "alright" in a more general sense.
> 
> I was going to say yes, but realized the answer is No.  It is only OK if the 
> optional part is null and that row is inserted first.  If it is NOT null, the 
> database will want to verify the validity immediately and it won't be there.  
> The only thing the database knows about the optionality is that null is 
> allowed.

Yeah.  I meant "more general sense" in that it's alright to have a model with a 
cycle where one of the relationships is optional, not in the general sense that 
_any arbitrary transaction_ will be OK.  Going back to the concrete example 
here, I've got Person.organisation (mandatory—every user is from an 
organisation) and Organisation.creator (optionally back to Person so that you 
can indicate which user created a new Organisation object).  It does present a 
bootstrapping problem in that the first Organisation won't have a creator.  Is 
there a better pattern for this kind of thing?


-- 
Paul Hoadley
http://logicsquad.net/



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

This email sent to [email protected]

Reply via email to