On the wiki page
Equals and HashCode under
Why are equals() and hashcode() important, it states "Hibernate works hard to prevent you from having to worry about [the fact that your objects are being moved out of memory]" and that "whenever you query for an object and find that particular object, Hibernate should return you that instance of the object. And Hibernate will do just that."
Okay, I know this is a stupid question, but I want to make sure I understand this. As I read this, it seems to me that this means that
so long as I am within the same session my objects are loaded in, I do not
have to override .equals() and .hashCode() (as far as hibernate is concerned that is). The only time I need to override these for hibernate's purposes is if I plan to detatch my objects from the session and then reuse them (perhaps with .update()) in another session.
Is my understanding correct?
Thanks so much, and sorry for the stupid question.[/url]