spring-projects / spring-projects/spring-data-jpa
Refactor `JpaEntityInformation` handling in `repository.query` and `repository.support` packages
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3.3k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
JpaEntityInformation is a central piece of information that we use across our repository and query implementations. We have to determine consistently an entity name that might come from XML (and not only @Entity), determine identifier columns and obtain the keyset for a given object.
Right now, we have several tangles and inconsistencies (e.g. if a domain class is not an EntityType, usages from JpaKeysetScrollQueryCreator in the query package). Ideally, all related information would reside inside JpaPersistentEntity or a similar type that we can put next to JpaPersistentEntity to unify identifier access (JpaPersistentEntityImpl and JpaMetamodelEntityInformation deal with identifiers and both in different ways).
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
Start by comparing JpaPersistentEntityImpl and JpaMetamodelEntityInformation, then inspect JpaKeysetScrollQueryCreator and the repository.query and repository.support packages. Done means entity naming, identifier access, and keyset retrieval are unified consistently for the described cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend, databases
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100