-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Non primary key join with Hibernate JPA
PostPosted: Wed Aug 20, 2008 1:10 pm 
Newbie

Joined: Wed Aug 20, 2008 12:49 pm
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.