2 Replies Latest reply on Apr 4, 2014 9:58 AM by Max Mustermann

    Underlaying entity changed

    Sebastian N. Newbie



      Envers is really great at showing me the revisions of a given entity, but it doesn't let me know when a underlaying entity changed. I've googled and searched here but can't find anything suitable entry.

      e.g. the structure:


      public class MainEntity ...

      > @OneToOne

      > private OtherEntity otherEntity;



      public class OtherEntity ...

      > @OneToOne

      > private OtherInfo otherInfo;



      public class OtherInfo ...

      > String fooBar;


      public List<Object[]> findRevisions(Class<?> type) {

              // essentials

              AuditReader reader = AuditReaderFactory.get(this.em);

              return reader.createQuery().forRevisionsOfEntity(type, false, true).getResultList();



      The fooBar String was changed over the MainEntity. The revision of OtherInfo was updated correctly. But how can I tell envers that the MainEntity revision update?

      Thanks in advance