FYI for anyone else who is implementing this in their application...
I ended up having to hook into the hibernate meta-data and manage this on my own..
pseudocode....
Code:
SoftDelete extends DefaultDeleteEventListener {
onDelete (DeleteEvent event) {
if (event.getObject should be soft deleted) {
if event has collections
loop thru properties
if property is collection && marked with delete cascade
loop thru collection and delete each element
mark event.getObject as deleted and update
} else
super.onDelete(event)
}
}
this is definitely a hack but there doesn't appear to be a way to soft delete and still cascasde that delete down thru collections. it would be very nice to have a way of doing this at a finer level with the event architecture (if anyone out there is listening). i would think many applications have a business requirement for this type of functionality.