]
Emmanuel Bernard updated ANN-728:
---------------------------------
Fix Version/s: 3.4.1
@NaturalId doesn't work with @Embeddable/@Embedded
--------------------------------------------------
Key: ANN-728
URL:
http://opensource.atlassian.com/projects/hibernate/browse/ANN-728
Project: Hibernate Annotations
Issue Type: Bug
Affects Versions: 3.3.1.GA
Reporter: Kenny MacLeod
Fix For: 3.4.1
Attachments: BugTestCase.java
If I try to annotate an @Entity's field with @NaturalId, and that field happens to be
@Embedded or @Embeddable, then hibernate barfs with
org.hibernate.MappingException: Unable to find logical column name from physical name
component in table BugTestCase$MyEntity
at org.hibernate.cfg.Mappings.getLogicalColumnName(Mappings.java:514)
at
org.hibernate.cfg.IndexOrUniqueKeySecondPass.doSecondPass(IndexOrUniqueKeySecondPass.java:61)
at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1136)
at
org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:324)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
at
org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:859)
See attached unit test as a demonstration.
Surely this is not an exotic scenario?
Tested with Hibernate Core 3.2.6-GA
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: