Problem with Cascade.REMOVE with OneToMany relationship JSE [FIXED] [message #517324] |
Fri, 26 February 2010 22:43 |
Daniel Le Berre Messages: 82 Registered: July 2009 |
Member |
|
|
Hi,
I am facing a strange issue.
I am using EclipseLink 2.0 in a web application running in JSE mode (Tomcat 6).
I have a hierarchy of entities (e.g. B extends A). B is in a OneToMany bidirectional relationship with class X.
I would like to remove elements X in relation with B when I remove B.
I set the cascade to Cascade.ALL.
If I deploy my entities in a JEE5 environment (Jonas 5.2 snapshot), it works fine.
(I mean I call the em.remove(a) in a stateless EJB)
If I deploy my entities on Tomcat 6, it does not seem to work.
(Here the em.remove(a) is performed in a regular Java class)
Is there something specific to setup to make cascading working in JSE environment?
[Updated on: Wed, 03 March 2010 07:06] Report message to a moderator
|
|
|
Re: Problem with Cascade.REMOVE with OneToMany relationship JSE [message #518031 is a reply to message #517324] |
Tue, 02 March 2010 19:58 |
|
Cascading of remove should work the same in both.
Are you using JTA and a managed EntityManager is Jonas? It could be something different in the way the entity is managed, how do you create your EntityManager in Tomcat? Check the state of the entity before removing it, does it have the related objects in the 1-m collection?
Also check if any errors are occurring and enable logging to debug.
James : Wiki : Book : Blog : Twitter
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03934 seconds