2 Replies Latest reply on Jan 3, 2011 7:59 PM by hernanbolido

    Envers by demand

    vipavel

      Hi

      I would like to enable envers by demand only.

      It works by overriding the listeners, but there is a problem with this issue.

      In case I have a hierarchy of objects that was already saved before (without envers) and I want to make an audited version of it I loose all the MTM data, because it was saved without envers and the event was not cought, so the MTM_aud is not created.

      Is there any way to tell envers to update these tables somehow?

       

      Thanks,

      Pavel

        • 1. Re: Envers by demand
          adamw

          So you would like to tell Envers to consider an update as an insert? There's no built-in way to do that right now. So I don't have much advice other then trying to modify the Envers source ...

           

          Adam

          • 2. Re: Envers by demand
            hernanbolido

            Hi!

             

            This issue would be really very helpful for us...

            But I have my doubts... For example, how could envers know if the history of an entity was already persisted or not? There must be a select against history tables...

             

            What do you think?

             

            Regards. Hernán.