Search code examples
mysqlspring-boothibernate-enversaudit-trail

Envers revinfo table empty but _aud table is fine - Spring Boot


I am pretty new to Envers - started yesterday. I am trying to extend an existing Spring Boot standalone application with Audit support using Envers. Since I had an issues in the beginning with an Exception I limited the @Audited annotation to a single class called Persona.

When I start the application, based on spring.jpa.hibernate.ddl-auto=update in the application properties file, the according persona_aud table for my entity is created and also the revinfo table. while the persona_aud table looks good and has entries for each Persona object that I inserted to the persona table, the revinfo table is empty. I mean it has absolutely no columns. My understanding is that it should contain two columns REV and REVTSTMP. The REV column in the persona_aud table is basically a foreign key to the REV column in the REVINFO table. But these columns are missing in revinfo. Obviously the rows relating to the insert transactions are equally missing.

When I start the application, the only message that I get related to Envers is o.h.e.b.i.EnversServiceImpl.configure:92: Envers integration enabled? : true in other words nothing that suggests an error.

I run MySQL Server 8.0.15, MyISAM, and I am using Spring Boot which gives me Hibernate Envers 5.3.10

What I am doing wrong?


Solution

  • I am totally puzzled. I tried 3 times the script, which generates test data and every time the revinfo table was empty. When I just consulted my brother to ask for his advice, the issue disappeared. I tried multiple times and everytime it works. sorry for bothering!