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.REMOVE not working in EJBs in different jars
PostPosted: Wed Dec 10, 2008 8:27 am 
Newbie

Joined: Sun Jun 17, 2007 7:04 am
Posts: 11
Hi there,
I am having a problem with Hibernate which I don't know if it is a problem or the regular behaviour.
Cascade.REMOVE is working fine for me but only between EJBs in the same .JAR (several jars, each for a differente "module" are packed in an .ear for my application)
I deploy a .ear file with EJBs grouped in different jars. Some times there are MANY-TO-ONE referentes from EJBs in these different jars. Every thing works OK with these EJBs even they are placed in different jars. My only problem is that removing a EJB will not remove the corresponding side of the relation y the EJB is in another jar file.
The only way to solve this is manually adding "on delete cascade" in the MySQL schema.

Is this normal?
Should Hibernate add "on delete cascade" constraint when creating the data base schema? It isn't now, but it manages OK cascade removing in EJBs in the same jar anyway.

I don't use any Hibernate specific feature. Just EJB3 annotations and I am using JBoss 4 as EJB container.

Thanks for any help/ideas

Ignacio


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.