Re: equal(Obj) and hashCode()

2011-10-13 Thread Bruno René Santos
Thanx Andrus, Two different contexts is the problem! I was quite amazed with this as I work for sometime with Cayenne and this problem never arose... I'll remove the new functions. Regards Bruno On Thu, Oct 13, 2011 at 12:07 PM, Andrus Adamchik wrote: > Uniquing (a guarantee that only one copy

Re: equal(Obj) and hashCode()

2011-10-13 Thread Andrus Adamchik
Uniquing (a guarantee that only one copy of object with a given ID exists within the same ObjectContext) is Cayenne feature that works consistently across all releases since the early days. Please DON'T attempt to override equals and hashCode. The problem is likely elsewhere (likely your 2 objec

equal(Obj) and hashCode()

2011-10-13 Thread Bruno René Santos
Hello all, I've come accross a problem with the CayenneDataObjects. For some reason Cayenne created two different instances of the same database object. This made that the function equals and hashCode returned different values for the same data object (conceptually). I checked the CayenneDataObjec