We have a multi-tenant Spring Web app setup with Hibernate as JPA. We use a tenant per schema. We like to use tools like Envers or JaVers for Audit logging such that every db schema has its own audit tables. How have you implemented this? Or would you implement it?
I have changed the code of JaVers a bit such that when it retrieves the db schema I will return the db schema that belongs to the logged-in user. This works partly as some tables are contained in the shared public schema, however, currently at the place were JaVers retrieves the db schema I don't have this entity/table info. I am thinking about changing JaVers code further such that I have this entity/table info, but isn't there a better library/approach to support multi-tenant?
Sorry for not posting any code