[Hibernate-JIRA] Created: (HHH-4901) One should not map IdClass properties in the mapping
by Emmanuel Bernard (JIRA)
One should not map IdClass properties in the mapping
----------------------------------------------------
Key: HHH-4901
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-4901
Project: Hibernate Core
Issue Type: Improvement
Components: core
Affects Versions: 3.5.0-Beta-4
Reporter: Emmanuel Bernard
A better fix for HH-4895 is explained below
AbstractEntityPersister#1847
we try and map the identifier with "id" (as no property named "id" is present)
The path is then nullified when calling initComponentPropertyPaths (it's not a qualified path)
We end up "remapping" the emp property but the one from the IdClass which is returned by getIdentifierType() in AbstractEntityPersister
HbmBinder does map it twice but since we don't have the type mismatch between idclass and the actual property hosted by the entity we don't fall into this bug
Somehow, we should not run AbstractEntityPersister#1847 if getIdentiierType() is the IdClass (ie there is an identifier mapper
but I don't know how to detect that)
--
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
14 years, 11 months