I have an hibernate object, transformed from a DTO, to delete. Because this object is not attached to the Session I can't just delete it, it will cause a NotUniqueObjectException, so I need to either merge it, or find the equivalent object in the Session. What is faster, to do Session.get()
or Session.merge()
?
Even better, is there a way of deleting an object without getting the managed object from the Session first?