Joined: Fri Apr 22, 2005 3:39 pm Posts: 18
|
Hi!
A question to Hibernate gurus: what query strategy does latest hibernate use to implement max.results (SQL limit) with left join (fetch)? What are workarounds?
"Hibernate in Action" says this is illegal, as max.results (SQL limit) will render the query inconsistent but notes that hibernate may fall silently to "workaround" strategies.
Example:
(from Cat c left join fetch c.kittens).setMaxResult(N);
I want all kittens correctly fetched eagerly and want only N cats.
Thanks!!!
|
|