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: transitive persistence in updating
PostPosted: Sun Sep 10, 2006 10:42 am 
Newbie

Joined: Wed Dec 14, 2005 7:27 am
Posts: 18
Hi,

I've got a question of transitive persistence that i would like to pose, to help me using hibernate. I've searched in other posts, and i can't find a solution to my problem.

My question is:

1 - I've two objects (A and B), and A is associated with B in a relation many-to-one. I suppose that, when i create a instance A, B must be alreadey created and for A be related to B, i must do "A.setB(B)".

But, when i want updated the instance A, should i do "A.setB(B)" for A maintains the relation?


Sincerily,
Pedro


Top
 Profile  
 
 Post subject:
PostPosted: Sun Sep 10, 2006 5:31 pm 
Senior
Senior

Joined: Sat Nov 27, 2004 4:13 am
Posts: 137
yes you should! or you must set update="false" for the many-to-one.

--------------
don't forget credits.

_________________
don't forget to credit!

Amir Pashazadeh
Payeshgaran MT
پايشگران مديريت طرح
http://www.payeshgaran.co
http://www.payeshgaran.org
http://www.payeshgaran.net


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.