You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently using: repo.findBy(predicate, query -> { return query.project("relatedObject").page(pageable); });
Where relatedObject is a lazy xToMany relationship on the entity in the repo.
Once the query is completed I still get lazy fetches for all my entities instead of the graph hint being populated to allow a larger but simpler query.
Is there a reason why the read page query does not apply the following logic ?
Please provide a Minimimal Reproducable Example, preferable as a Github repository. Make sure to include the database, either as an in memory database or if that is not possible using Testcontainers.
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.
Currently using:
repo.findBy(predicate, query -> { return query.project("relatedObject").page(pageable); });
Where relatedObject is a lazy xToMany relationship on the entity in the repo.
Once the query is completed I still get lazy fetches for all my entities instead of the graph hint being populated to allow a larger but simpler query.
Is there a reason why the read page query does not apply the following logic ?
https://github.com/spring-projects/spring-data-jpa/blob/main/spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/FetchableFluentQueryByPredicate.java#L176-L182
if (!properties.isEmpty()) { pagedQuery.setHint(EntityGraphFactory.HINT, EntityGraphFactory.create(entityManager, entityType, properties)); }
The text was updated successfully, but these errors were encountered: