Greetings!
I'm currently need to replicate() subgraphs of objects from one DB to another. I'm searching for a way to effectively initialize a subgraph of objects (possibly proxied), containing multiple collections. Known solutions:
1) use lazy=false. Too poor performance in other cases...
2) Hibernate.initialize() recursivelty. Bad performance: causes n selects
3) eagerly fetch a graph in a single query usin criteria API (setFetchMode), but AFAIK, it can fetch only a single collection per request eagerly.
So waht's the solution if any? :-)
Hibernate definetely needs a way to do it in a single call.
Thanks for your help!
Michael.
|