EntityGraph and QueryDSL not working together [DATAJPA-988]

Open
#1,334 0 comments 0 reactions 1 assignee View on GitHub

@odrotbohm is already working on this.

Since Dec 30, 2020.

Assessment

This issue has not been assessed yet.

Description

in: core in: querydsl type: bug

Miguel Cardoso opened DATAJPA-988 and commented

If you use a repository that extends QueryDslPredicateExecutor and then try to use a method with a @EntityGraph annotation Spring Data will fail to perform the query since it seems to be ignoring the @EntityGraph annotation so it won't join the entities referred on it.

There is a thread at SO with a good example of the problem and a potential fix, but this involves using custom repositories and removing the @EntityGraph annotation:
http://stackoverflow.com/questions/27494988

I think this is an important bug since it will require a lot of boilerplate code to be written for something that should be trivial otherwise (ie using a simple @EntityGraph annotation).


Affects: 1.10.4 (Hopper SR4)

Reference URL: http://stackoverflow.com/questions/27494988

1 votes, 2 watchers

Dominant language
Java
Stars
3.3k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from spring-projects/spring-data-jpa

All issues in spring-projects/spring-data-jpa

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.