| From: Matthew Hixson [mailto:[EMAIL PROTECTED]]
| Subject: DTO.equals()
|
| I'm considering overriding equals on one of our DTO classes and am
| considering having it only compare against the PK field of the foreign
| DTO. Has anyone else done this? Is there anything to watch
| out for in doing this?
Don't forget to override hashCode() if you override equals(). If you don't,
your class may not work the way you think it should if you use it in a
Hash{Map|Set|Table}.
Cheers!
-- Tracy
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".