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".
|