-->
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: Adding and Updating a data from a table with two primary key
PostPosted: Fri Aug 20, 2010 1:27 am 
Newbie

Joined: Thu Aug 19, 2010 11:54 pm
Posts: 2
Hello...

I am working on a program that has two primary keys in one of its table in the database, when the hibernate generate the pojo, the id was separated. I dont know how to deal with it to add and update some data. Can anyone help me?


Top
 Profile  
 
 Post subject: Re: Adding and Updating a data from a table with two primary key
PostPosted: Fri Aug 20, 2010 2:03 am 
Expert
Expert

Joined: Wed Mar 03, 2004 6:35 am
Posts: 1240
Location: Lund, Sweden
Read the chapter about using <composite-id> http://docs.jboss.org/hibernate/stable/ ... ompositeid or the corresponding chapter for annotations http://docs.jboss.org/hibernate/stable/ ... ml#d0e2177


Top
 Profile  
 
 Post subject: Re: Adding and Updating a data from a table with two primary key
PostPosted: Fri Aug 20, 2010 2:43 am 
Newbie

Joined: Thu Aug 19, 2010 11:54 pm
Posts: 2
Thanks a lot. Ill try it out... :)


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.