-->
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.  [ 1 post ] 
Author Message
 Post subject: problem deleting referenced object
PostPosted: Tue Nov 06, 2007 11:02 am 
Newbie

Joined: Tue Nov 06, 2007 10:55 am
Posts: 3
Location: Netherlands
Hi all,

I have a problem with the following scenario:
There are two object, let's say A and B.
Object B is referenced by object A, but is nullable in object A.

When i delete object B, i do not wish to delete object A (no cascading), i just want to set the value A.b to null.
unfortunately deleting object B throws an exception stating:
DELETE statement conflicted with COLUMN REFERENCE constraint ......

I have a workaround for this problem (first setting attribute A.b to null and then saving object A) but i was wondering if there is a way to make hibernate do this automatically.

Thanks in advance


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.