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&...]