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开发者_如何学JAVA'm using two persistence units, one for Oracle and the other HSQLDB.
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).
精彩评论