Maps with objects as values cannot be used as keys if the hashcode is lazily loaded.
------------------------------------------------------------------------------------
Key: HHH-6316
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-6316
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.6.1
Environment: H2 1.3.153 or MySQL 5.1.x, Linux 2.6.38, Java 1.6.0_24-b07
Reporter: Sumit Raja
Priority: Minor
Attachments: hibernate-test.tgz
When two maps are defined, one containing a type as a value and the other with the same
type as key a NPE occurs when doing a get from the type-as-key map, only when the
type-as-value map is loaded, but not accessed. The type uses a non-id field for its hash
code, which causes the NPE to occur on key insertion.
Attached test case probably explains it better.
--
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