| we are using a framework (Grails/GORM) that takes care of the hibernate initialization and a few plugins which re-build the Metadata (for the existing SessionFactory) at runtime, after the initial bootstrapping already happened, in order to allow to introspect the Metadata. this works fine as long as envers is not in use because of this guard: https://github.com/hibernate/hibernate-orm/blob/5.2.12/hibernate-envers/src/main/java/org/hibernate/envers/boot/internal/EnversServiceImpl.java#L108 i also read https://vladmihalcea.com/2017/08/24/how-to-get-the-entity-mapping-to-database-table-binding-metadata-from-hibernate which suggests using an Integrator to capture and expose the built Metadata. is that the recommended approach, i.e. should re-building the Metadata be avoided? or is there any specific reason why envers does not allow it? thanks for your feedback! |