spring-projects / spring-projects/spring-data-jpa

Process spel values of @QueryHint

Open
#3,082 3 comments 3 reactions 1 assignee View on GitHub

@gregturn is already working on this.

Since Jul 24, 2023.

status: feedback-provided type: enhancement
Dominant language
Java
Stars
3.3k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

Some query hints are very specific values, rather than a boolean, like a timeout on an SQL query. Usually it is not too hard wired in a production grade system but configurable. It is impossible to achieve this behavior with @QueryHints({@QueryHint...}) since the value of QueryHint is not going through on expression language lookup (which would help to get the value at least from a properties/yaml file).
Another possibility I see, and it is somewhat covered in this ticket, is that the JpaRepository interface methods should support some kind of List structure as an input so we can pass them in programatically when we call those methods.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.