-->
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: Reg. Primary Key Mapping
PostPosted: Wed Dec 22, 2004 6:57 am 
Newbie

Joined: Wed Dec 22, 2004 6:54 am
Posts: 1
Does it require to have a primary key column in tables to use hibernate. I have read the article which says that it is required to have primary key column in your tables so that hibernate can identifu each record uniquely.

I am trying to insert a data into following table design

Code:
UserHead
------------
User_Id       Varchar(6) PK
Password     Varchar(8) Not Null
User_Name  Varchar(20) Not Null

UserDetails
--------------
User_Id        Varchar(6) References UserHead(User_Id) Not Null
Role_Id         Varchar(3) Not Null


For above schema design how can we use hibernate. Any example source code provided will be appreciated.

Thanks in advance.


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.