spring-projects / spring-projects/spring-data-jpa
Consider EntityGraph argument for query methods
Open
Nobody has claimed this yet.
type: enhancement
- Dominant language
- Java
- Stars
- 3.3k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
It would be neat to provide an entity graph to a query method through a Spring Data JPA type allowing:
- Declaration through typed property paths (e.g.
EntityGraphHint.fetch(Person::getFirstName, Person::getAddress, …)) - From a named entity graph reference (
EntityGraphHint.fetch("my-named-graph"),EntityGraphHint.load("my-named-graph")) - From a
EntityGraphobject (EntityGraphHint.fetch(obj),EntityGraphHint.load(obj))
Within this ticket, we should also consider the following changes:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation files or tests are named. Start by reviewing the proposed EntityGraphHint forms in this issue and then read related issues #2113, #1746, and #1334 to determine the combined scope. Done means the query-method API supports the agreed entity-graph inputs and the related changes have been considered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend, database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100