aspose file tools*
The moose likes Object Relational Mapping and the fly likes Connecting to multiple Databases using Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Connecting to multiple Databases using Hibernate" Watch "Connecting to multiple Databases using Hibernate" New topic

Connecting to multiple Databases using Hibernate

Vidya Lakshman

Joined: Apr 09, 2008
Posts: 11

I am using Hsql & derbydb using hibernate. HSQL has department & derby has emp table. I am trying to perform join operation on emp & dept.
Any help/pointers in this regard is highly appreciated. Please find the code below.
Bill Gorder

Joined: Mar 07, 2010
Posts: 1632

Please UseCodeTags when posting code or configuration. I have done this for you this time to demonstrate how much easier it is to read.

Hibernate does not support joining across multiple physical database instances. Actually most databases don't support this either and when they do the databases must be the same type. I am fairly certain that neither Derby nor HSQL support this.

You will need to load this information separately.

[How To Ask Questions][Read before you PM me]
It is sorta covered in the JavaRanch Style Guide.
subject: Connecting to multiple Databases using Hibernate
Similar Threads
hibernate 1:M relationships & cascade
sorting table columns
hbm file version working but annotation not
Question for SCBCD aspirants (and gurus)...
Problem in hibernate programme