spring-projects / spring-projects/spring-data-jpa
FilterDef and Filter annotations not working after upgrade.
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3.3k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
Previous Dependency Versions:
- Spring boot v2.1.2, Spring data JPA v2.1.4 , Hibernate 5.3.7.Final
Upgraded Dependency Versions:
- Spring boot v2.5.12, spring data jpa v2.5.10, Hibernate v5.4.33
Query Generation with earlier version (Repository.getById()):
Hibernate: select useraccoun0_.id as id1_2_, useraccoun0_.tenant_id as tenant_i4_2_, useraccoun0_.first_name as first_na2_2_, useraccoun0_.last_name as last_nam3_2_ from user_account useraccoun0_ where useraccoun0_.tenant_id = ? and useraccoun0_.id=?
Query Generation after upgrade (Repository.getById()):
Hibernate: select useraccoun0_.id as id1_2_0_, useraccoun0_.tenant_id as tenant_i4_2_0_, useraccoun0_.first_name as first_na2_2_0_, useraccoun0_.last_name as last_nam3_2_0_ from user_account useraccoun0_ where useraccoun0_.id=?
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 at Repository.getById() and compare the generated SQL between the previous and upgraded dependency versions listed in the issue. Trace how the FilterDef and Filter annotations are handled during query generation, then verify the reproduction against the expected tenant_id predicate. Done means the filter is applied after the upgrade.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100