-->
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: How to create index, composite primary keys
PostPosted: Wed May 02, 2007 6:50 pm 
Newbie

Joined: Sat Apr 21, 2007 9:48 pm
Posts: 9
I need to create simple index on a particular column during database creation time. How do I do that ?

Also how do i create composite primary key ?


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 02, 2007 9:54 pm 
Newbie

Joined: Thu Apr 26, 2007 11:25 pm
Posts: 5
composite primary key example:

Code:
<composite-id>
          <key-property column="id" name="id" type="int"/>
          <key-property column="year" name="year" type="long" length="4"/>
</composite-id>


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 04, 2007 11:50 pm 
Newbie

Joined: Sat Apr 21, 2007 9:48 pm
Posts: 9
How do i create a composite unique key ?

By default hibernate creates a primary key id. But I want another two columns which should be always unique when considered together..


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.