Use of referencedColumnName in @JoinColumns produce error, without this execute correctly
-----------------------------------------------------------------------------------------
Key: HHH-5874
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5874
Project: Hibernate Core
Issue Type: Bug
Components: annotations, core, query-sql
Environment: Hibernate version shipped with JBoss 5.0.1 GA (3.5 Final?),
PostgreSQL 9.0 64 bits, Java 6 64 bits, Windows 7 64 bits
Reporter: Sento Niñerola Molina
Hello everyone:
I'm having a very strange error when using Hibernate JPA shipped in the JBoss AS
5.0.1.
When I put @ManyToOne relationship, with several @JoinColumn within a @JoinColumns (since
I have FK to entities with composite PK) and set the parameter
"referencedColumnName" an exception occurs: org.hibernate.AnnotationException:
Column name DDPROV_ID of test.DdProvincia not found in JoinColumns.referencedColumnName,
where DDPROV_ID is one of the columns that forms the PK of the table DDPROVINCIAS.
The strange thing is that if I remove the parameter "referencedColumnName",
everything works fine. How is this possible? Moreover, the JPA standard indicates that
this attribute is mandatory in a @JoinColumn when exists more than two inside
@JoinColumns.
--
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