Re: nested contexts

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

  • Next message: Javi Peter: "RE: Modeler Exception for using dots on attributes"

    IIRC there were some locking jiras, but they will be treated as bugs,
    not as limitation by design.

    Andrus

    On Jan 13, 2009, at 2:29 PM, Aristedes Maniatis wrote:

    >
    > On 13/01/2009, at 11:09 PM, Andrus Adamchik wrote:
    >
    >>
    >> 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.
    >
    >
    > Ah, so cloning a new object between contexts in this way is OK. That
    > would do nicely, although I thought for some reason we couldn't do
    > that for fear of some sort of locking problem. I'll give it a go.
    >
    > Ari
    >
    >
    >
    >
    > -------------------------->
    > ish
    > http://www.ish.com.au
    > Level 1, 30 Wilson Street Newtown 2042 Australia
    > phone +61 2 9550 5001 fax +61 2 9550 4001
    > GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Tue Jan 13 2009 - 07:38:16 EST