-->
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: Cascade Delete on a newly instantiated objects graph
PostPosted: Thu Apr 28, 2005 9:15 am 
Newbie

Joined: Thu Apr 28, 2005 9:09 am
Posts: 1
Hoping you will feel my question interesting.

I would lile to use cascade all-delete-orphan on a parent/child relationship with hibernate objects that have been newly instantiated with Data Transfert Objects (DTO), coming from another tier. I build the complete graph of objects to be persisted, with their correct id, version, etc...

But when I delete the parent, hibernate do not propagate the deletion to the childs. I get an integrity constraint violated as it tries to delete the parent record but child records are still found.

Is this the normal behavior ?
Do I have to reload the original persistent object from the database ?
Or is Hibernate clever enough to make the comparison btw my provided collection and the collection maintained by the persistent manager ?

Thanks for your help.

Xav


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.