[jboss-dev-forums] [EJB3 Development] - Re: Entity hashCode and equals overriding

fabio valsecchi do-not-reply at jboss.com
Sat Jan 5 12:15:49 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/787923#787923

--------------------------------------------------------------
If I invoke one time addArticle() method then the cart is not empty but cart.getArticles().get(book) always return null even if the cart contains some entries. When I got this situation i figured out that the problem was the lack of hashCode and equals. Now that the methods are implemented nothing is changed. Moreover i've tried using a hashCode() that return always 1 and equals() that return always true but *currentQuantity* is still null.
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/787923#787923]

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/57c3ec43/attachment-0001.html 


More information about the jboss-dev-forums mailing list