-->
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.  [ 4 posts ] 
Author Message
 Post subject: One to One Mapping JPA/Hibernate
PostPosted: Tue Jun 17, 2008 4:57 pm 
Newbie

Joined: Thu Aug 11, 2005 12:15 am
Posts: 9
Can I map a one to one bi-directional relationship where the owning entity has a string for a primary key rather than an id field? If so, can someone show me an example? I keep getting an Oracle invalid number error (I'm using Hibernate as the provider).

Thanks,
mort


Top
 Profile  
 
 Post subject: Re: One to One Mapping JPA/Hibernate
PostPosted: Tue Mar 15, 2011 1:13 pm 
Newbie

Joined: Tue Mar 15, 2011 1:12 pm
Posts: 6
Hi, did you ever manage to solve this problem? I have a similar issue


Top
 Profile  
 
 Post subject: Re: One to One Mapping JPA/Hibernate
PostPosted: Tue Mar 15, 2011 5:30 pm 
Regular
Regular

Joined: Fri Jan 28, 2011 11:44 am
Posts: 117
I think what you are looking for here is the referencedColumnName property of the JoinColumn annotation ...
But I'm not really sure I understood your problem so I might be wrong. Can you elabore with an example?


Top
 Profile  
 
 Post subject: Re: One to One Mapping JPA/Hibernate
PostPosted: Wed Mar 16, 2011 9:24 am 
Newbie

Joined: Tue Mar 15, 2011 1:12 pm
Posts: 6
Check out the post I wrote, titled "Invalid number error when loading related entity". I have a detailed example and explanation in there including various solutions I've tried. It should be similar to the issue outlined here.


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

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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.