I have an entity representing generic users, stored in a table that is filled only on lower environments. Of course, that shouldn't be used in production, and to be sure we don't make a mistake, the mock table even doesn't exist in production environment.
In order to present theses generic users in an admin screen, I created a GenericUser entity that i've mapped on the table "GENERIC_USER". My problem is, even if i don't use this entity in production (by conditioning it to environment parameters), the entity would still be present in the code, and the webapp will complain at startup (and then fail) the table GENERIC_USER is missing.
Is there a way to ask JPA to ignore the non presence of a given table depending on a parameter ?
Switching off the whole validation of the scheman (removing hibernate.hbm2ddl.auto="validate") is not an option for me.
Thanks