I am working on a multi-tenanted application (with old database structure) where I have a common user table and set of tables based on the access permission.
For example if the user can work with invoice of different companies C1 and C2, the database contains a tables with name C1_invoice and C2_invoice.
I am able to achieve adding prefix with one company using org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
So I can access C1_invoice table. But how can I choose the prefix C1 or C2 dynamically?