Good day!
I'm hoping for an out-of-the-box solution to navigating an object graph that is persisted across several databases.
The software under development is using Hibernate to map to legacy databases where relationships span multiple databases (six in this case).
I'm trying to provide a general access solution to higher tiers by making the objects navigable in as natural a way possible. However, at the data access level, there is no way to know to what extend a client process will need to navigate the graph.
Lazy loading appears to be the best solution here. But I don't see a way to do that directly for cross-db relationships.
For example say A-->B-->C and A,B are in DB1 but C is in DB2. If a client process has a reference to A, it might get a proxy when it calls A.getB(). But what is the best approach to providing A.getB().getC() ? C is only available via a different session since it is persisted to a different DB.
As I said, I'm hoping for an out-of-the-box solution but I would appreciate any thoughts about good roads to explore.
TIA,
-dub
|