-->
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: inverse="true" always on the many side ?
PostPosted: Thu Feb 23, 2006 8:34 am 
Newbie

Joined: Mon Apr 19, 2004 5:56 am
Posts: 9
Hi everybody,
Could you confirm me that in a one-to-many relationship, the inverse="true" must always be set on the pojo wich hold the many set ?

(inverse="true")
A ---> * B

And i'have to write the following code if i want to set a relation from A :

B.setA(A);
save(A);


Thanks,
BenoƮt.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 23, 2006 10:22 am 
Regular
Regular

Joined: Tue Nov 29, 2005 12:31 pm
Posts: 75
Hi,

1. You can do it also at the other end of the association.

2.
B.setA(A);
A.getBs.add(B);
save(A);


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.