From: <PAR...@t-...> - 2005-12-15 10:49:33
|
I found the following problem: I have a master detail reltaion (the details are aggregated). If I add a detail to the master after add another detail with the same va= lues but different reference. The value object code does not add the second detail object to the addedD= etails it will be added only to the details collection. I debugged and found this : if (! this.onceAddedCarryItems.contains(added)) this.onceAddedCarryItems.add(added); if (! this.addedCarryItems.contains(added)) this.addedCarryItems.add(added); both conditions are false so I suppose that both VOs hashCode are the sam= e and the Collection.contains method finds this object in the collection by= its hashCode. My questions are that; Is it a normal behavior or bug? Where can I modify the VO's hashCode generator algorythm. Thanks, Zsolt Paroczi |