-->
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: Cascade="persist" propagates to null child object?
PostPosted: Wed May 16, 2007 9:45 am 
Newbie

Joined: Fri Aug 04, 2006 12:27 pm
Posts: 14
Hi,
I have the following problem:
Cascade="persist" for parent and child objects.
When saving parent object where child object is sometimes null, Hibernate saves also the null child object. That means an empty row in table(except the id as primary key). I think it is better not saving empty row if child object is null.
How can we avoid this problem?
Thank you in advance for your opinions!
Tvan


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 22, 2007 10:00 am 
Newbie

Joined: Fri Aug 04, 2006 12:27 pm
Posts: 14
Hi,
Nobody has any idea about this problem: saves an empty record, is it a good practice?
Best regards
Tvan


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.