On Feb 1, 2006, at 14:07, Arnaud Garcia wrote:
> yes, it exactly what I want: is o1 equivalent o2, if yes not add o2
> to O.
> you right I can overide equals (I already did this), what I would
> like to know is, if there a way to find all the fiels of o1 that
> are PK.
> If there is such method, I can create a general method to check if
> two objets are equivalent ...
>
> (I have this problem, because I have another datasource (XML) and I
> build my object from XML, and I need to check if there are already
> in my dataContect before adding them )
DataObjectUtils are great for this sort of stuff. Just query for
existing object with the same primary key and create a new one if it
does not already exist.
- Tore.
This archive was generated by hypermail 2.0.0 : Wed Feb 01 2006 - 08:19:54 EST