-->
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: two primary key hbm
PostPosted: Sat May 03, 2008 11:37 pm 
Newbie

Joined: Thu Dec 01, 2005 5:58 pm
Posts: 10
i have two primary key for a table. how can map this to the hbm.

this is my current hbm and it contains error. i need some help to fix this.

thanks

<class name="Company" table="tbl_company_product" lazy = "false">
<id name="companyID">
<generator class="native"/>
</id>
<id name="productID">
<generator class="native"/>
</id>
<property name="price"/>
</class>


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 05, 2008 2:01 am 
Senior
Senior

Joined: Mon Feb 25, 2008 1:48 am
Posts: 191
Location: India
Try using composite key.

_________________
Sukirtha


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.