This has been asked over and over but still there's no compelling answer that I could find either in the Hibernate book, on the Hibernate site or in any of the forums:
What is the best way to deal with lazy loading in a layered architecture?
Gavin basically
suggests prefetching all required data. However, with complex object graphs,
this is not a feasible solution.
I am looking for a solution that would perform
tranparent non-transactional loading of lazily loaded collections for objects passed between layers. Needless to say, the original session is no longer available and the transaction that loaded the object might have already been closed by the time a collection is accessed.
Hibernate version: 3.0rc1
Thank you in advance,
Eli