These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: different prefix for tables and columns in one session
PostPosted: Mon Mar 10, 2008 8:42 am 
Newbie

Joined: Mon Feb 11, 2008 4:29 pm
Posts: 6
Hi!

Before I can tell you my question I have to explain te context of it.

I have two databases that are on the same server. Each database has a prefix that is used for the tables and columns in that database. I wrote 2 session factories one for each database and used the naming strategy on each session. And is all working.

Now, my problem is that my boss doesn't want to use 2 sessions because Oracle sees all the databases as a single one, and you can refer to a table using database_name.owner.table_name.

He wants to use a single session and to prefix the tables something like: db1.owner1.prefix1_table_from_db1 and the columns from that table only with prefix1_column on the first database and db2.owner2.prefix2_table_from_db2 ant the columns from that table only with prefix2_column on the second database.

So, do you think it's possible to do this things using naming strategy in hibernate and spring? My problem is that I don't know from what database/table is the column to set the right prefix because it has a single parameter "columnName".


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.