-->
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: Saving an Object without its associations
PostPosted: Thu Nov 24, 2005 8:14 am 
Newbie

Joined: Wed Mar 09, 2005 11:32 am
Posts: 18
Hello.

I would like Save a new persistant object without creating/loading its

associations. meanning that I want to pass only the foreign key id.

How can I do that? I want to be able to do so without removing the foreign

key constraint.

Thank you.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 24, 2005 8:51 am 
Senior
Senior

Joined: Mon Aug 22, 2005 5:45 am
Posts: 146
since hibernate is an object-oriented persistence engine you need to pass your associations on object level.

If you really need to set the foreign key only only I would suggest to define the foreign key as a simple property, not as an association.

Of course you will loose your model-consistency on the object-level.


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.