Also, the Criteria API follows a completely different path for entity graphs, i.e.
/**
* Encapsulates a JPA EntityGraph provided through a JPQL query hint. Converts the fetches into a list of AST
* FromElements. The logic is kept here as much as possible in order to make it easy to remove this in the future,
* once our AST is improved and this "hack" is no longer needed.
*
* @author Brett Meyer
*/
public class EntityGraphQueryHint {
which won't even take into account the graph type (fetch/load) and simply updated the query with joins, killing pagination and failing with multiple collections in the graph. |