0

I Know that when you do this code:

    AuditReader reader = AuditReaderFactory.get(entityManager);
    reader.createQuery().forRevisionsOfEntity(Person.class,false,true).getResultList();

it returns a tree element array. I want this 3 elements array to be mapped in a new class:

public class PersonNew {

Person person;
DefaultRevisionEntity revision;
RevisionType revisionType;

public PersonNew (Person person, DefaultRevisionEntity revision, RevisionType revisionType) {
    this.person = person;
    this.revision = revision;
    this.revisionType = revisionType;
}

}

i know that in criteria an in simple select you can do something like

select new com.package.PersonNew () from Person.

How does it apply to hibernate envers query?

Neil Stockton
  • 11,383
  • 3
  • 34
  • 29
cat
  • 3
  • 3

1 Answers1

0

You cannot do this in Envers currently, you will need to do the mapping yourself.

adamw
  • 8,038
  • 4
  • 28
  • 32