How do I use the @Table
annotation of hibernate using a variable that returns the name of the table, for example @Table(name = "dep4"+Dados.getCodEmp)
? I am using this form but I get the following error:
The value for annotation attribute Table.name must be a constant expression
I need this because in the system database in question the tables are generated with the following nomenclature prefix + the code assigned to the company, for example dep4+(CodEmp)
. This code I get from a text file that is inside the application directory.