-->
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.  [ 2 posts ] 
Author Message
 Post subject: Provider could not understand the actual relationship!
PostPosted: Tue Aug 10, 2010 11:59 am 
Newbie

Joined: Tue Aug 10, 2010 6:35 am
Posts: 3
Say the PK of table B is a FK, which references the PK of table A. (and assume EntityA and EntityB are mapped to table A and table B respectively)

If EntitityA and EntityB are persisted (and PK is generated for EntityA) the provider should pick up the PK from EntityA and use it for EntityB as well.

But EclipseLink needs two separate PKs to be generated. That means we have to generate another PK which is definitely equal to the PK of the former according to the relationship.

Why EclipseLink needs duplicate information? Am I missing anything, please explain?


Top
 Profile  
 
 Post subject: Re: Provider could not understand the actual relationship!
PostPosted: Tue Aug 10, 2010 12:45 pm 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
I don't know anything about EclipseLink or why you post a question about it in a forum about Hibernate. In any case, the Hibernate documentation has an example how to do this with standard JPA annotations. See the example with a @OneToOne mapping in http://docs.jboss.org/hibernate/stable/ ... identifier


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.