-->
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: How to assign compsite keys manually
PostPosted: Fri Jul 03, 2009 12:42 am 
Newbie

Joined: Tue Feb 24, 2009 7:19 am
Posts: 3
When I want to save data then I am facing this Exception.This table has Composit Key.Please tell me how to assign compsite keys manually.

org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save().


Top
 Profile  
 
 Post subject: Re: How to assign compsite keys manually
PostPosted: Fri Jul 03, 2009 3:24 am 
Regular
Regular

Joined: Sun Sep 30, 2007 7:51 pm
Posts: 93
Wel.. what to say. In the code you have to set the key. Like

Code:
Dog dog = new Dog();
dog.setCompositeKey(new DogCompositeKey("husky","bruno"));

...

Or be more verbose with your problem (like, what your class looks like etc...).


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.