-->
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: Set linked value to 0
PostPosted: Mon Mar 27, 2006 8:57 am 
Newbie

Joined: Mon Mar 27, 2006 8:19 am
Posts: 1
Hi,
I've got a little newbie problem.
In my application are some User Object, creating Log (Object) Entries.
The User has a Set with the Logs.

Code:
User config:
...
<set name="logs" cascade="save-update" lazy="true">
          <key column="log_id"/>
          <one-to-many class="Log"/>
</set>


Now I want to remove the User but keep the Log Data.
How do I have to configure the cascade attribute to set the linked user id in the log table to 0?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 27, 2006 10:24 am 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
This should be done by Hibernate.
Maybe you have to correctly set 'inverse' attribute.


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.