-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Change in behavior of DefaultDeleteEventListener
PostPosted: Wed Oct 17, 2007 10:57 am 
Newbie

Joined: Wed Oct 17, 2007 10:12 am
Posts: 1
This is a request for an update to the hibernate migration page so save others the trouble I experienced.

The upgrade was from 3.0.5 to 3.2.3.

There seems to have been a change in how the DefaultDeleteEventListener bahaves. Until upgrading, I only implemented the method
Code:
public void onDelete(DeleteEvent event) throws HibernateException

and as expected, this method got called when an entity is deleted. On upgrading to 3.2.3, this method was not getting called. The fix was to override
Code:
public void onDelete(DeleteEvent event, Set transientEntities) throws HibernateException

I haven't investigated what has changed. If anybody can shed some light that would be great.

There was nothing obvious on the migration web page that indicates something has changed.

This is an important change because if override this method to do soft deletes for instance, this will cease to work and it's hard to find.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.