Probably my question is not about the equals and hash functions, but about how to create the complex tree of objects in one transaction and avoid creating multiple rows in database for the same object.
Zdenek M --- In [email protected], Zdenek Mikan <[EMAIL PROTECTED]> wrote: > > I have seen some discussions on the web about not using database > generated id in equals() and hash() functions for data objects (in java > DTO model) as it changes during save operation. But in the open source > samples there are either these functions based on id > > (http://weblogs.macromedia.com/pent/archives/2007/10/flex_and_hibern.html) > > or these functions are omitted > > (http://blogs.adobe.com/mtg/2006/08/my_first_hibernate_enabled_fle.html > and http://fleksray.org/flex_datamanagement_service_hibernate_en.html). > > IMHO these samples will not work correctly with more complex object > trees. Can someone give me the advice how to deal with this issue: is it > better to compute hash from all properties (columns) of object or is it > better to add special uid column into tables (and save it inot > database)? The object retrieved from LCDS into Flex has the uid property > - is it possible to use this property in equals() and hash() functions > (in Java)? > > Thanks in advance for answers and opinions. > > Zdenek M >

