I guess this concerns H3.x. I'm posting this thread as a follow-up to this bug report :
http://opensource.atlassian.com/project ... se/HHH-980
Someone was reporting that the javadoc of FetchMode.SELECT might be wrong asserting that the FetchMode.SELECT does fetch
eagerly with a separate select : See
http://www.docjar.com/docs/api/org/hibe ... tml#SELECT
I can't understand it. As I thought I'd understood : eager is the contrary of lazy, so here's what I asked Christian Bauer as a comment to the bug report :
Quote:
What's the meaning of lazy. I mean, I think I know it but, from what I understood, that's :
Say you have A which contains a list of B
* Retrieve A with a criteria query like session.createCriteria(A.class).setFetchMode("b",FetchMode.SELECT);
* close the session
* access a.getB() without receiving a LazyInitException ?
I just re-tried this use case and received a LazyInitException... Maybe I've not understood something, I'll certainly post a thread in the forum so as this behaviour can be explained further.
Is there some expert, or at least anybody that understands what the Hibernate team, and Christian here mean by speaking about an
eager behaviour with setFetchMode("someRelation",FetchMode.SELECT)?
Thanks a lot for your help