-->
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.  [ 3 posts ] 
Author Message
 Post subject: Does it neccessary to define Primary Key
PostPosted: Wed Mar 02, 2005 10:18 am 
Beginner
Beginner

Joined: Thu Feb 24, 2005 8:27 am
Posts: 21
Can u please tell me , is there neccessary to define a primary key for a class. Cause my table do not have primary key . It has Foreign key so what should i do...


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 08, 2005 8:16 am 
Newbie

Joined: Wed Feb 23, 2005 9:00 am
Posts: 8
Please help me out . Does primary key is required if i don't want to specify <id> tag in hbm.xml file cause if don't have primary key what should i do.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 08, 2005 9:00 am 
Newbie

Joined: Mon Feb 28, 2005 12:53 pm
Posts: 18
You can add all your properties to a composite-id:

<composite-id>
<key-property ... />
.........
</composite-id>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.