|
Thanks for your comment in hibernate in action.
I will read this soon.
I guess the worst pitfall may be that as long as your data
is not inserted (like if you call 'new YourClass()'), there is no way to compare
2 objects...
Maybe you would need some type of comparator for
non-inserted objects... From: Dodo [mailto:[EMAIL PROTECTED] Sent: Wednesday, 14 June 2006 21:48 To: [email protected] Subject: database identity (or surrogate key) for equals() Hi,
I am thinking of using surrogate key (the one
generated by
database) to implement equals() of domain object
for ibatis.
Now is there any pitfall I need to
know???
Anyone doing things this way??
Although 'Hibernate in Action' said this is a bad
idea but
I only want to compare objects that have id so I
guess
this shud be ok.
Thanks,
Sam
|
