-->
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: how to generate ids and also references?
PostPosted: Tue Apr 20, 2004 9:21 am 
Newbie

Joined: Tue Mar 23, 2004 10:40 am
Posts: 9
Location: toronto
I have two tables A and B. B has a foreign key to A. When I use middlegen to generate the Class A and B, Class A has a Set of Class Bs and Class B has a Class A reference. This is good but I would also like Class B to contain the id of Class A.

This would allow me to find a Class A if I loaded class B lazily (by comparing A.id with B.A_id).

Im guessing I need to add the A_id field to class B and add something to the ClassB mapping file.

Thanks in advance :)

_________________
Be happy :)


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.