| Author |
IllegalArgumentException: cannot remove/save a detached entity
|
Prashaant Sharma
Greenhorn
Joined: May 10, 2010
Posts: 1
|
|
Hi,
I have 3 entities with relationships shown below.
Entity: MyA
Entity: MyB
Entity: MyC
When removing already persisted MyA entity using below code, I am getting "java.lang.IllegalArgumentException: Removing a detached instance MyA" exception
Any help or pointers would be really helpful.
Thanks in advance
|
 |
Tejas Morabia
Greenhorn
Joined: Mar 06, 2010
Posts: 7
|
|
A transfer object are usually detached. And detached object cannot be removed.
So i will suggest try to use merge before removing.
Try something like this
I hope this helps.
|
 |
 |
|
|
subject: IllegalArgumentException: cannot remove/save a detached entity
|
|
|