alebu wrote:
Hibernate version:3.1
Name and version of the database you are using:Sybase ASE 12.5
Hi!
I have database where some tables are owned by different users. To access tables of different user I need to specify username before tablename. So, simple select looks like:
SELECT * FROM <username>.<tablename>.
Can I specify somewhere in hibernate configuration username
to force hibernate to use that name in all queries as table prefix?
Because, currently I got Error:
"<tablename> not found. Specify owner.objectname"
Here objectname is <tablename>
do I understand you right, you have an app with user management and for each user you create a table?
I would suggest to build the sessionFactory on app startup programmatically.
You can use plain JDBC to retrieve the list of users and build mapping-classed based on this list.
Is that what you need?