[
https://hibernate.onjira.com/browse/HHH-3799?page=com.atlassian.jira.plug...
]
Nate Clark commented on HHH-3799:
---------------------------------
I respect that. Like yang to your yin, my intent is to help people experiencing this
problem to understand why this poses a problem that goes well beyond what Hibernate
developers can solve for you. Though they might be able to provide a local patch for eager
fetches that still work in spite of a hashCode contract broken by Hibernate users (albeit
following the advice of Hibernate developers), they can not drive a stake through the
heart of your problem, and you may see its negative impacts in other areas of your
application. This concern is more than philosophical :)
PersistentSet does not honor hashcode/equals contract when loaded
eagerly
-------------------------------------------------------------------------
Key: HHH-3799
URL:
https://hibernate.onjira.com/browse/HHH-3799
Project: Hibernate ORM
Issue Type: Bug
Components: core
Affects Versions: 3.3.1, 3.5.1
Reporter: Igor Vaynberg
Assignee: Gail Badner
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.
For more information on JIRA, see:
http://www.atlassian.com/software/jira