[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3799?page=c...
]
Dave Lindquist commented on HHH-3799:
-------------------------------------
We've just run into this problem as well...
Specifically, we have an object which contains a Set, loaded eagerly, and an attempt to do
a 'contains' in that set fails. However, if we change our getter to say
"return new HashSet(<instance-variable>)" instead, then things succeed
(ie, forcing creation of a new set object).
However, I have to disagree with the priority on this item -- this is NOT a minor item --
this is at LEAST a "major", if not a "critical" item.
PersistentSet does not honor hashcode/equals contract when loaded
eagerly
-------------------------------------------------------------------------
Key: HHH-3799
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3799
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.3.1
Reporter: Igor Vaynberg
Assignee: Gail Badner
Priority: Minor
Attachments: test.zip
when persistent set is loaded eagerly in some situations it calls hashcode on its items
before their field values are populated and then uses this incorrect hashcode to store
them in the set. this makes set items inaccessible by any collection items that rely on
hashcode such as contains(), remove(), etc.
attached is a simple maven test project that reproduces the error, unzip and mvn test to
run the test.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira