When using CriteriaBuilder.fetch() with nested paths the join fetches are not present in the object query with pagination.
As a workaround, the subpaths have to be passed to fetch() individually, but this shouldn't be necessary:
Won't work with pagination:
cb.fetch("document.owner")
Workaround:
cb.fetch("document", "document.owner")
When using
CriteriaBuilder.fetch()with nested paths the join fetches are not present in the object query with pagination.As a workaround, the subpaths have to be passed to
fetch()individually, but this shouldn't be necessary:Won't work with pagination:
Workaround: