Re: Queries on non-committed objects

From: Cris Daniluk (cris.danilu..mail.com)
Date: Sun Feb 05 2006 - 20:19:00 EST

  • Next message: Todd O'Bryan: "Re: Queries on non-committed objects"

    I'm betting that he's calling addToData() AND setToData() on the
    uncommitted object. I've noticed that when you set both forward and
    reverse relationships, you get duplicates.. its pretty easy to
    accidentally call both.

    On 2/5/06, Andrus Adamchik <andru..bjectstyle.org> wrote:
    >
    > On Feb 5, 2006, at 6:15 PM, Todd O'Bryan wrote:
    >
    > > I tried to work around the problem by faking the query by going
    > > through the elements I'd added to my DataObject by hand.
    > > Unfortunately, it appears that things are getting double-added for
    > > some reason. I'm using the Cayenne-generated addToData() method to
    > > add 8 pieces of data to a DataObject. But when I called getData(),
    > > I get a List with 16 elements. Similarly, when I go through the
    > > List to pull out the elements I care about, I discover two exact
    > > copies (down to oids) of the same object. Any idea what's going on?
    > > None of this has been written to the database yet. Does Cayenne do
    > > double-entry accounting for some reason?
    >
    > There have been earlier indications that a relationship list
    > misbehaves under certain conditions. So I tend to think there might
    > be a bug... Nothing I could reproduce though. So I would really
    > appreciate if you (or someone else with a similar problem) submit a
    > bug report with a DataMap and a self-contained test case showing the
    > problem. Other than that, all I can say - it works for me :-)
    >
    > Andrus
    >
    >



    This archive was generated by hypermail 2.0.0 : Sun Feb 05 2006 - 20:19:02 EST