Use JPA Criteria API instead of writing native queries.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 60
- Forks
- 78
- PR merge metrics
- No merged PRs in 30d
Description
Description:
JPQL/Native queries does not provide type safety. It also makes it hard to switch the JPA provider later on. Therefore, writing JPQL is discouraged in favor of Criteria API starting from JPA 2.0.
As part of this, we need to generate the JPA metamodel for Testgrid entities as well. Metamodel allows type-safe referencing of entity parameters.
Affected Product Version:
0.9.0-m10
OS, DB, other environment details and versions:
N/A
Steps to reproduce:
N/A
Related Issues:
N/A
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
The issue names no files or tests. Start by locating the Testgrid entities and existing JPQL or native queries, then review how JPA Criteria API and metamodel generation fit the project. Done means the relevant queries use Criteria API and a metamodel is generated for the Testgrid entities.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, database
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100