-->
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: unidirectional ManyToOne and "ON CASCADE DELETE"
PostPosted: Fri Dec 02, 2011 11:03 am 
Newbie

Joined: Thu Nov 24, 2011 1:47 pm
Posts: 3
I have a problem that's equal to the one presented here: http://stackoverflow.com/questions/1715 ... -hibernate

After searching for a while I can't find a decent solution for this. I can't have the parent entity have an @OneToMany to the child, because they are at different modules. I wanted to try the EntityListener that would delete the children before the parent is, but I can't because, again, they are at different modules.

Is there a clean solution to this? Can I define an EntityListener in the other module?


Top
 Profile  
 
 Post subject: Re: unidirectional ManyToOne and "ON CASCADE DELETE"
PostPosted: Tue Dec 06, 2011 7:36 am 
Newbie

Joined: Thu Nov 24, 2011 1:47 pm
Posts: 3
Well, after some thought I realized that I couldn't use EntityListener as it is stateless. Given that I would have to implement it anyway, I created a solution based on listeners. The solution is written as anwer to this question in stackoverflow:

http://stackoverflow.com/questions/8384 ... 19#8399119


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.