Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

IllegalArgumentException: Removing a detached instance

 
Fabrizio Pia
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.
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:



and



Please, can anyone help me?
thank you
fpia
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic