I have no java certifications. This makes me a bad programmer. Ignore my post.
I have no java certifications. This makes me a bad programmer. Ignore my post.
a) If you haven't implemented hashCode and equals in Attribute / AttributeCategory then do that right now . I've been re-reading some of the hibernate docs this week, and I remember mention of the fact that you have to do that if you want to use detached sessions (i.e. if you want to pass the object through many app layers ).
You have to override the equals() and hashCode() methods if you
* intend to put instances of persistent classes in a Set (the recommended way to represent many-valued associations) and
* intend to use reattachment of detached instances
Hibernate guarantees equivalence of persistent identity (database row) and Java identity only inside a particular session scope. So as soon as we mix instances retrieved in different sessions, we must implement equals() and hashCode() if we wish to have meaningful semantics for Sets.
I have no java certifications. This makes me a bad programmer. Ignore my post.
I have no java certifications. This makes me a bad programmer. Ignore my post.
I'm just a poor boy, I need no sympathy, because I'm easy come, easy go, little high, little low, little ad
New web page for Paul's Rocket Mass Heaters movies
https://coderanch.com/t/785239/web-page-Paul-Rocket-Mass
|