-->
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: Customized id generation strategy
PostPosted: Wed Sep 19, 2012 7:00 am 
Newbie

Joined: Thu Sep 13, 2012 12:41 pm
Posts: 2
Say we have 3 tables, 'Employee' with 'empid' as PK,
'Address' with 'addressid' as PK and 'empref' as FK
'Phone' with 'phoneid' as PK and 'empref' as FK
Also, 'Employee' has unidirectional One-to-Many association with 'Address' and 'Phone'.

I am looking for a JPA compliant customized id generation strategy where the insertion of Employee should generate a unique-not-null value as 'empid' and set the same under 'empref' of both Phone and Address tables. (we are using JPA(hibernate-jpa-2.0-api-1.0.1.Final.jar) with hibernate version 3.6.10.Final)

Can someone help me out on this...

Thanks
Vasu


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.