-->
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: Need urgent help in @oneToMany relationship.
PostPosted: Sat Feb 14, 2015 5:48 am 
Newbie

Joined: Sat Feb 14, 2015 5:40 am
Posts: 1
Hi All,


We are migrating from jboss 5.1 to wildfly 8.1. Hence the hibernate version has also changed.


I have a entity PropagationTransitionEvent. "PropagationTransitionEvent" has onetomany relationship with the following:

PropagationStateTransition
PropagationTransitionAction.


PropagationTransitionAction is an abstract class entity which has PropagationTAEmail / PropagationTASMS as its childrens.

When I try to delete PropagationTransitionEvent, PropagationStateTransition is deleted successfully. But PropagationTransitionAction is not deleted.

When I enabled the debug logs, I was surprised to find that there are not queries generated to delete the PropagationTransitionAction.

CodeSnippet :

@OneToMany(mappedBy = "ptEvent", fetch = EAGER, cascade = ALL, orphanRemoval=true)
private Set<PropagationStateTransition> transitions = new HashSet<PropagationStateTransition>();

@OneToMany(mappedBy = "ptEvent", fetch = EAGER, cascade = ALL,orphanRemoval=true)
private Set<PropagationTransitionAction> actions = new HashSet<PropagationTransitionAction>();


Debug logs :



2015-02-13 14:12:07,194 INFO [stdout] (EJB default - 1) delete
2015-02-13 14:12:07,194 INFO [stdout] (EJB default - 1) from
2015-02-13 14:12:07,194 INFO [stdout] (EJB default - 1) SOL_PROP_ST
2015-02-13 14:12:07,194 INFO [stdout] (EJB default - 1) where
2015-02-13 14:12:07,194 INFO [stdout] (EJB default - 1) ID=?
2015-02-13 14:12:07,195 INFO [stdout] (EJB default - 1) Hibernate:
2015-02-13 14:12:07,195 INFO [stdout] (EJB default - 1) delete
2015-02-13 14:12:07,195 INFO [stdout] (EJB default - 1) from
2015-02-13 14:12:07,195 INFO [stdout] (EJB default - 1) SOL_PT_EVENT
2015-02-13 14:12:07,195 INFO [stdout] (EJB default - 1) where
2015-02-13 14:12:07,195 INFO [stdout] (EJB default - 1) ID=?
2015-02-13 14:12:07,201 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EJB default - 1) SQL Error: 2292, SQLState: 23000
2015-02-13 14:12:07,201 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (EJB default - 1) ORA-02292: integrity constraint (SI11WILDFLYTESTDB.PTA_PT_EVENT_ID_FK) violated - child record found



The same code works perfectly fine with jboss 5.1.

Any help is sincerely appreciated.

/Umesh Paliwal


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.