tags:

views:

43

answers:

1

I have moved a group of tables to hsqldb for faster performance, however there are a few residual Many to 1 associations between the hsqldb tables and Oracle tables. Is it possible to configure hibernate to manage this type of association? Currently i'm using two persistence units, one for Oracle and the other HSQLDB.

+1  A: 

Hibernate does not support relationships between different databases and certainly not databases of different types.

You will probably have to manage the "fetch" of those related entities by hand, perhaps by converting the many-to-one to just raw foreign key values and then doing the fetch from the Oracle db (using a different SessionFactory if you are using hibernate for both).

Mike Q
worked around it by copying reference tables to hsqldb during startup. Have a session for each oracle and hsqldb.
Trevor