deleted object would be re-saved by cascade (remove deleted object from associations):

eraser

deleted object would be re-saved by cascade (remove deleted object from associations):

Kind of oxymoron ha?!.

You try to delete but you are told it would be re-saved.

Actually it is a safe guard by hibernate that this action is meaningless unless you do the actual stuff.

Two things to check:

  • make sure any collection that holds the object is cleared before deleting the object
  • Clear the child object from the parent object before deleting the child if you have cascade="all"

See also Why jsf applications get slow when using a jpa connection

Learn How to add unicode characters to database from hibernate application

See how you would solve these known algorithm problems

Kadane’s algorithm in C – Dynamic Programming

Find K Complementary numbers from array Java implementation

Implementing tokenizer and adding tokens to the linked list

Java solution for checking anagram strings – tell if phrases are anagrams

Find longest palindrom from sequence of characters

Find the pairs that makes K Complementary in the given array java solution

Find the first occurence of number in the sorted array

testing k complementary pairs algorithm with junit

Changing decimal number to its binary equivalent

Finding missing numbers from billion sequential number list file

One Comment
  1. Sachin Paradkar

    Even I was getting “deleted object would be re-saved by cascade (remove deleted object from associations):” error but for me I had to add cascade=”all” to my many-to-one mapping .
    Thanks for the help , tried looking for this problem at multiple places, but adding cascade=”all” to my hbm file solved my problem .

Leave a Reply to Sachin Paradkar Cancel reply

Your email address will not be published. Required fields are marked *

*
*