Re: Re[2]: Child context for Web App

From: Pierre Gilquin (pgilqui..luewin.ch)
Date: Mon Mar 24 2008 - 06:29:18 EDT

  • Next message: Eric Polino: "Listing Attributes"

    I realize that after a childContext.commitChangesToParent(), the globalContext.uncommittedObjects() contains objects in
    globalContext.
    So at application level, based on the persistence state, I can add new objects and delete old objects in my lists
    without localObject() conversion.

    Thanks for your help.

    Pierre

    ----- Original Message -----
    From: "Razumovsky Andrey" <hmai..otmail.ru>
    To: <use..ayenne.apache.org>
    Sent: Sunday, March 23, 2008 11:01 AM
    Subject: Re: Re[2]: Child context for Web App

    > Hi again, Pierre!
    >
    > I think i finally understood your problem, forget all i said about nested contexts :)
    >
    > PG> It seems to me that if you want to make relations between objects, they have to be in the same context.
    > Not 100% sure, but i think so. For workaround, you need that localObject() method.
    >
    > PG> Do I have to make all these object's conversions (from parent to child context and back) or is there a shortcut ?
    > I don't know about any. Still, you can use context.uncommittedObjects() method to obtain collection of
    > created/deleted/modified objects and easily iterate through it. I don't see any problems here.
    >
    > Regards,
    > Andrey
    >



    This archive was generated by hypermail 2.0.0 : Mon Mar 24 2008 - 06:29:54 EDT