This is mentioned in the QueryHints Javadoc (admittedly, no-one would really look there):
{quote} /** * Hint providing a "fetchgraph" EntityGraph. Attributes explicitly specified as AttributeNodes are treated as * FetchType.EAGER (via join fetch or subsequent select). * * Note: Currently, attributes that are not specified are treated as FetchType.LAZY or FetchType.EAGER depending * on the attribute's definition in metadata, rather than forcing FetchType.LAZY. */ {quote}
So, "fetchgraph" and "loadgraph" are currently identical. It's not currently possible to force laziness through JPQL/HQL, but hopefully this will become possible be an option in the future (will require architectural changes we're making in 4 . 3 and 5+). Leaving this open for that reason.
|