Re: Weird Behaviour with Nullify rule

From: Mike Kienenberger (mkienen..laska.net)
Date: Wed Oct 20 2004 - 10:53:38 EDT

  • Next message: Jorge Sopena: "Re: Weird Behaviour with Nullify rule"

    Jorge Sopena <jsopen..idsa.es> wrote:
    > Looking the log, I've realised that in the first case there isn't any
    > query to DB, is to say, the object is found in DataConext.
    > Meanwhile in the second case there is a query to DB. why?

    I don't know.

    Jorge Sopena <jsopen..idsa.es> wrote:
    > No exactly, in the list is still the object path3 but with
    > PersistentState.COMITTED.
    > When I do the delete, Cayenne tries to remove this object from the List
    > but the method List.contains() yields false.
    > So Cayenne doesn't remove this object.
    > The main problem is when I do the selectQuery to get the object path3, a
    > new object is recover from the DB instead of DataContext.
    > So, I've got two diferent objects for path3, and the method equals()
    > return false.
    >
    > Why is "path3" recover from DB if it's in the DataContext?

    That's a good question.

    Can you output the value of the two different path3 objects and compare why
    they are different? The default .toString() method should be sufficient.

    Cayenne should not allow two copies of the same object to be in the
    objectStore.

    -Mike



    This archive was generated by hypermail 2.0.0 : Wed Oct 20 2004 - 10:52:14 EDT