Re: Couple of questions.

From: Mike Kienenberger (mkienen..mail.com)
Date: Fri Aug 26 2005 - 16:42:31 EDT

  • Next message: Gili: "Lazily column retrieval"

    Nick, I don't completely understand your situation, so I can't say much more.

    Maybe some code examples would enlighten me.

    Short of that, stepping through the debugger and watching what happens
    in addedtoUnresolved() and getToManyList() is probably your best bet.

    On 8/26/05, Nick Stuart <nicholas.stuar..mail.com> wrote:
    > One more quick note.
    >
    > After the commit, (this is a many-to-many in this case) both objectA
    > and objectB will have the other objects in their respective
    > 'addedtoUnresolved' list. Its not until I do something like
    > objectA.getToManyList().size() will the objects be removed from
    > 'addedToUnresolved' and added/recreated to 'objectList'. Have to do
    > the same for objectB to get the items to move as well.
    >
    > -Nick
    >
    > On 8/26/05, Nick Stuart <nicholas.stuar..mail.com> wrote:
    > > Yes. Everything is in the same context (Absolutly sure of this). This
    > > is kind of related to other wierd behavior I was seeing in my other
    > > posts to the list. Thats why I dont understand why its creating new
    > > objects. I always call ctx.createAndRegisterNewObject when I am
    > > creating things and make sure I'm commiting when I need to be, so I'm
    > > not sure whats going on.
    > >
    > > Are the XML/Mappings combatible from 1.2M5 to 1.1? Would like to try
    > > out 1.1 to see if its behaving like this.
    > >
    > > -Nick
    > >
    > > On 8/26/05, Mike Kienenberger <mkienen..mail.com> wrote:
    > > > Are both objects in the same DataContext?
    > > >
    > > >
    > > > On 8/26/05, Nick Stuart <nicholas.stuar..mail.com> wrote:
    > > > > Got a couple more questions for anyone that can answer.
    > > > >
    > > > > When are objects supposed to move from 'addedToUnresolved' to the
    > > > > actual 'objectList' for to-Many relationships, and when they move, are
    > > > > new objects created int the 'objectList' or simply moved over there?
    > > > >
    > > > > Running some tests I'm seeing that new objects are being created and
    > > > > this is causing a problem when I check the toMany list with
    > > > > 'contains(object)' and its not showing up (even though its really
    > > > > there).
    > > > >
    > > > > So whats happening:
    > > > > In my test I create objectA
    > > > >
    > > > > I create objectB which has a toMany list holding objectA
    > > > >
    > > > > once everything is commited objectB now has an objectA instance in its
    > > > > objectList, but its not the same java object in my test scope.
    > > > >
    > > > > Make sense at all? know its confusing but just wondering if I'm doing
    > > > > something wrong here.
    > > > >
    > > > > -Nick
    > > > >
    > > >
    > >
    >



    This archive was generated by hypermail 2.0.0 : Fri Aug 26 2005 - 16:42:34 EDT