[jboss-dev-forums] [EJB3 Development] - Re: Entity hashCode and equals overriding
fabio valsecchi
do-not-reply at jboss.com
Sat Jan 5 12:34:29 EST 2013
fabio valsecchi [https://community.jboss.org/people/fabiovalse] created the discussion
"Re: Entity hashCode and equals overriding"
To view the discussion, visit: https://community.jboss.org/message/787945#787945
--------------------------------------------------------------
I tried to use equals() returning true and hashCode returning 1 only for testing. Because in this way if all books has the same hashcode it would like "all the books are the same". But since even in this case the call returns null i've tried with normal equals() and hashCode() to print the hashCode of the book inserted in the cart and the hashCode of the book inserted. They were equals.
However i can retry to investigate deeply.
Thank u Piotr!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/787945#787945]
Start a new discussion in EJB3 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2030]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20130105/ddb208e6/attachment.html
More information about the jboss-dev-forums
mailing list