aspose file tools
The moose likes Object Relational Mapping and the fly likes Mutiple DBs and one Session Factory??? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "Mutiple DBs and one Session Factory???" Watch "Mutiple DBs and one Session Factory???" New topic
Author

Mutiple DBs and one Session Factory???

Thillai Sakthi
Ranch Hand

Joined: Jun 17, 2000
Posts: 91
Hi All:
I am new to hibernate. Need a quick help please.........
I wish to show a report joining two tables - these tables are in different databases. As multiple DBs are used, I have created two .cfg.xml files and loaded them manually for Configuration and SessionFactories....
With two different SessionFactories, dont know how do I query and get data???

Any help would be highly appreciated.


Regards,<br /> <br />Shakthi
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Hibernate cannot map related tables where the tables are in two different DBs. You need to look at your DB docs about cross database relationships.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Mutiple DBs and one Session Factory???
 
Similar Threads
Hibernate Commnication between two database
How do you implement a clustered database?
compare records
using hibernate with tables have no relation
Hibernate Configuration help!