• Post Reply Bookmark Topic Watch Topic
  • New Topic

Update an ArrayList using JPA + Hibernate

 
sarada bokka
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am having two tables 1) classification ,2)classificationtemplate where classificationtemplate is an array list.
I am able to add successfully deleting is causing issues

Now I am trying to update the arraylist by
1) deleting the classification (this is to remove the old data)
2) add the updated data (add the new data)

It is failing at step 1 :

I have defined my entity as


Please help me where things are going wrong?

error: detached cannot be removed.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!