To all Hibernate JPA experts out there,
I am using JPA implementation with Hibernate. I have a scenario where I need to create a join on non-primary key column with unique values in it. By using the following annotation, the join I get an error saying
Quote:
'join cannot be created on non-primary key'
.
Code:
@JoinColumn(name = "NO_PRIMARY_KEY", referencedColumnName = "NO_PRIMARY_KEY_IN_JOINING_ENTITY")
private JoiningEntity joiningEntity;
Can anyone advice how to create a join on non-primary key columns, I know its possible is frameworks like KODO, was wondering if this is possible with JPA implementation in Hibernate using annotations?
Here are the JPA and Hibernate versions I am using:
hibernate version - 3.2.5.ga
hibernate-entitymanager version - 3.3.1.ga
persistence-api version - 1.0
Thanks in advace.
Lash