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 thing to check would be, make sure any collection that holds the object is cleared before deleting the object and the other and most probably the most one would be: Clear the child object from the parent object before deleting the child if you have cascade=”all”

About these ads

, , , , , , , , , ,

  1. #1 by Sachin Paradkar on November 18, 2011 - 11:17 pm

    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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: