• Post Reply Bookmark Topic Watch Topic
  • New Topic

IllegalArgumentException: Removing a detached instance

Fabrizio Pia
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate and Spring are running.
I've two tables in a one-to-many relation.
When I try to remove an object (from the "many" side) I get the message "IllegalArgumentException: Removing a detached instance"
I've already read some older topics. They suggest that when you have a detached object, you need to relaod it in a new hibernate session. It is possible to do that with a merge operation.

I keep on getting the same error. I don't know what else to do!!

Here my code:

and here the relations between objects:


Please, can anyone help me?
thank you
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!