-->
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: [new user] Which is the best way to save a relationship
PostPosted: Thu Mar 03, 2005 12:56 pm 
Newbie

Joined: Thu Jun 17, 2004 4:16 pm
Posts: 18
Hi all, I am new to hibernate 2.1.8 and I am little confused about how can I save or update objects which have a type of relantionship. I read the hibernate reference but I am still confused.

Assume the following example:


Code:
track.getArtists().add(artist);


Do I have to save to the session the object "artist" or is it done automatically.

Can you give me an answer? and also which is the best way to save the new relationship? Can you provide me a link about this matter?

Thank you in advance, kostas


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 03, 2005 1:04 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Read the Parent-Child-Relationship chapter of the reference manual.


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.