michael wrote:
You can also set the schema on every class individually.
Is it possible to set the schema for a class and a single request ? Otherwise I would have to create a specific bean for every customer and map it to another schema. This will lead to maintenance nightmare.
I know the client's name at the time when I have to query the database, so I would like to decide on the schema of a mapped class at runtime.
I.e. something like:
if (customer_name.equals("C1")) {
session.<setSchemaForBean>(AccountBean.class, "pdo.customer1$");
} else if (customer_name.equals("C2")) {
session.<setSchemaForBean>(AccountBean.class, "pdo.customer2$");
}
Is something like that possible ?