Re: Adding the same object twice

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Sun Sep 11 2005 - 16:10:21 EDT

  • Next message: Gili: "Re: Adding the same object twice"

    Looking at the code, yeah, same object can be added twice to the
    ToManyList. While I am still leaning in favor of leaving things as
    they are now, I can see how this can cause problems if you add and
    then remove the same object.

    Any possible solution would require a list to behave like a Set on
    add or at least on remove. This adds overhead.

    Andrus

    On Sep 11, 2005, at 3:26 PM, Kevin Menard wrote:
    >
    > On Sep 11, 2005, at 12:40 PM, Andrus Adamchik wrote:
    >
    >> Two different objects, or the same object added twice? The only
    >> case of two different objects having the same ObjectId is if they
    >> are coming from different DataContexts. Though a recent thread on
    >> cayenne-user suggests that there maybe some other holes:
    >
    > Same object. I just figured the ObjectId was an easy way to
    > identify them. But, they are the same exact object.
    >
    >>
    >> http://objectstyle.org/cayenne/lists/cayenne-user/2005/08/0034.html
    >
    > I'll read that over.
    >
    > --
    > Kevin
    >



    This archive was generated by hypermail 2.0.0 : Sun Sep 11 2005 - 16:10:25 EDT