-->
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.  [ 1 post ] 
Author Message
 Post subject: Composite key generation ?
PostPosted: Wed Dec 23, 2009 12:16 am 
Newbie

Joined: Tue Dec 22, 2009 11:52 pm
Posts: 10
I have a composite key represented as EmbeddedId in hibernate. Inside composite primary key, 1st key is identity key (it means its value is generated by Sybase database) and the 2nd primary key is foreign key. So now my question where should i use @GeneratedValue inside @Entity or @Embeddable ?
To be frank, i have tried to use @GeneratedValue at all places and it does not work for me, means it does not generate 1st primary nor reference foreign key.
Please suggest.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.