1 Reply Latest reply on Apr 5, 2008 8:38 PM by Pete Muir

    Getting original entity while changing through hibernate

    Benjamin Graf Novice


      I use FlushModeType.MANUAL for my conversation methods to buffer changes to my entities. This way I have the possibility to cancel operations without due to rollback. But if want to make a backup of the original entity while/before flushing to the database with entityManager.flush() I need the unedited orginal entity version. How do I get it from database without deleting my done changes? Tried entityManager.find() without success! entityManager.refresh() seems to override my changes.

      Thanks for help!

      Greets Benjamin