cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: nested contexts
Date Tue, 13 Jan 2009 12:09:47 GMT

On Jan 13, 2009, at 1:26 PM, Aristedes Maniatis wrote:

>>>
>>> I think it is a bug, and relating objects should be allowed  
>>> between parent/child contexts.
>>
>> Not so. Parent/child relationship determines the path of the select  
>> and commit operations, but has no effect on the rule that each  
>> object belongs to just one context, and no relationships between  
>> them are possible.
>
> That's a little awkward then. If a user is in the middle of creating  
> a new Artist and decides to create a Painting (in a child context),  
> then it is troublesome to create the join. We can't move the Artist  
> into the child context so that it can be joined there to the  
> Painting, so I assume the only solution is to postpone the join  
> until the child context is committed back to its parent. But that is  
> awkward since while in the child editing context, the Painting has  
> no access to the Artist it should be related to.

This is approached differently. You would clone an Artist from the  
parent to the child context via 'localObject' (even though the parent  
object may still be NEW), and then set the relationship between the  
two local objects.

Andrus


Mime
View raw message