[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-4249) @NaturalId doesn't work with @Embeddable/@Embedded
Paul Bernard AMADE (JIRA)
noreply at atlassian.com
Thu Apr 12 03:44:48 EDT 2012
[ https://hibernate.onjira.com/browse/HHH-4249?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=46254#comment-46254 ]
Paul Bernard AMADE commented on HHH-4249:
-----------------------------------------
is this bug still lingering?
this is not an exotic scenario ....I need this feature!
> @NaturalId doesn't work with @Embeddable/@Embedded
> --------------------------------------------------
>
> Key: HHH-4249
> URL: https://hibernate.onjira.com/browse/HHH-4249
> Project: Hibernate ORM
> Issue Type: Bug
> Components: annotations
> Reporter: Kenny MacLeod
> 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.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list