I'm +1 on fixing this for add/remove. This has to do with data
integrity (which superceeds performance in my view) and I remember the
Cayenne documentation explicitly stating that although it represents
query results as a List they are really a Set. A relationship is quite
often a query result. Besides which, I think the performance drop this
would introduce will be minimal.
Gili
Andrus Adamchik wrote:
> 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
>>
>
>
-- http://www.desktopbeautifier.com/
This archive was generated by hypermail 2.0.0 : Sun Sep 11 2005 - 16:21:52 EDT