-->
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: Parent delete not working if a Child exists
PostPosted: Tue Dec 04, 2012 10:27 am 
Newbie

Joined: Tue Dec 04, 2012 10:14 am
Posts: 1
Hi All,
so i have following Problem with a delete Action in my Software.

There is a Parent which can have some childs, because there are some fields with OneToMany relations.
If the parent has no child in any of the relations, the deletion of the parent works.
But if there any relation the EntityManager.remove(parent) will not produce a exception and i saw in the sql debug there was no delete Statement.

I use Hibernate 4.1.8.Final and Spring 3.1.3.

I don't want to remove the childs automatized, so cascade is not a option for me.
Do you have any suggestion how i can configure Hibernate to work like expected in this scenario ?

Cheers,
MacMail


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.