-->
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: Hibernate one to one Mapping
PostPosted: Tue Dec 09, 2008 4:40 am 
Newbie

Joined: Tue Dec 09, 2008 4:17 am
Posts: 2
Hi All,

I have 2 tables Employee and Role.
Both these tables have there own Primary Keys.

The table structure is :

Employee : EmpId (PK), EmpName, emailID.
Role : EmpRoleId(PK) , empID (FK from Employee table) ,RoleID.

How can i generate one to one mapping between them.
Please note we have different Primary Keys.

Please provide me with sample hbm files for both.

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 20, 2009 10:03 am 
Beginner
Beginner

Joined: Wed Aug 22, 2007 5:53 am
Posts: 38
Even i am looking for the same scenario...


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.