Referenced column of an embedded component is not recognized by @JoinColumnOrFormula
------------------------------------------------------------------------------------
Key: HHH-5828
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5828
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.6.0
Environment: Hibernate 3.6.0
Reporter: Kyrill Alyoshin
Whenever @JoinColumnOrFormula is referencing a column of an embedded component like this:
{code}
@JoinColumnsOrFormulas({
@JoinColumnOrFormula(formula = @JoinFormula(value = "to_char(pm_company_id)",
referencedColumnName = "ext_vendor_source_id"))
})
{code}
where 'ext_vendor_source_id' is mapped to an @Embeddable component, Hibernate
fails at startup with the following exception:
{code}
Caused by: org.hibernate.AnnotationException: referencedColumnNames(ext_vendor_source_id)
of xxx.core.domain.entity.main.Vendor.pmCompany referencing
xxx.core.domain.entity.main.RawVendorInfo not mapped to a single property
at
org.hibernate.cfg.BinderHelper.createSyntheticPropertyReference(BinderHelper.java:204)
at org.hibernate.cfg.ToOneFkSecondPass.doSecondPass(ToOneFkSecondPass.java:114)
at org.hibernate.cfg.Configuration.processEndOfQueue(Configuration.java:1550)
at org.hibernate.cfg.Configuration.processFkSecondPassInOrder(Configuration.java:1473)
{code}
--
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