Re: nested contexts

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Jan 13 2009 - 07:09:47 EST

  • Next message: Aristedes Maniatis: "Re: nested contexts"

    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



    This archive was generated by hypermail 2.0.0 : Tue Jan 13 2009 - 07:10:21 EST