-->
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: need mapping solution ?
PostPosted: Mon Mar 07, 2005 8:22 am 
Newbie

Joined: Mon Mar 07, 2005 7:52 am
Posts: 4
I have 2 types of records: there are many records in the second table that must point to one record in the first table, and each record in the first table must point to only one record in the second. How should i make the associations between the two classes. I am not interested to have in the first table the children set reference, only one at my choice (whichi i have to be able to update independently). Both records have unique independent identifiers.
The simplified case is:

example:
the class1 object should have:
itsId, myPreferedChildOfClass2
second class object shoudl have:
itsId, parentObjectOfClass1
for the second class i think i should use many-to-one for the parentObjectOfClass1, but i am not sure of first class mapping...

regards,

_________________
edif


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.