Hibernate version:3.0.5
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using: PostgreSQL 7.4.7
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Here is my issue. I have one database which is composed of n schema (each customer got one schema). Each time we have a new customer, we had a new schema to the database.
All schemas got the same DML (same table definition and all the other stuff).
Depending on which client connect to the web application, I want to connect to the appropriate schema. (equivalent to postgres SQL command : SET search_path TO customer1).
I want to be able to add new customer dinamically to the application, so no repackaging.
I want to share the same connection pool for all the customers.
I had a look at the documentation and the forums and did not find much informations. I tried to execute the "SET search_path TO customer1" directly into hibernate but it did not work using Query or SQLQuery.
Am I trying to do something which should not be done? Is there a way to execute this set command into hibernate?
http://forum.hibernate.org/viewtopic.ph ... ple+schema
http://forum.hibernate.org/viewtopic.ph ... ple+schema
Thanks for your help.
Damien