> I see that I can call OptimisticLockException.getFreshSnapshot to get > information about the object that failed to save, but if the object was > deleted in the DB, then this returns null. In that case, how do I find out > which object was the reason for the failure? >
I'm also not sure how to get the failed object when it's not deleted - I can't convert the fresh snapshot to a PersistentObject without knowing what class / entity it is.