Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential fix for count with joins #1897

Merged
merged 5 commits into from
Dec 13, 2022
Merged

Potential fix for count with joins #1897

merged 5 commits into from
Dec 13, 2022

Conversation

radovanradic
Copy link
Contributor

Potential fix for #1882
The issue is when there is one to many, so join between 1 author and 2 books loads 2 records which then later gets read into 1 author object and 2 book records in the list. The idea is to skip this join in pageable count query in this case. Not sure if that could introduce other issues (hopefully not) or if there is better fix.

@sonarcloud
Copy link

sonarcloud bot commented Dec 12, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

85.7% 85.7% Coverage
0.0% 0.0% Duplication

@radovanradic radovanradic marked this pull request as ready for review December 12, 2022 13:31
@radovanradic radovanradic merged commit 017e45a into master Dec 13, 2022
@radovanradic radovanradic deleted the issue-1882 branch December 13, 2022 10:13
@dstepanov dstepanov added this to the 3.9.0 milestone Dec 13, 2022
@dstepanov dstepanov added the type: bug Something isn't working label Dec 13, 2022
lcavadas pushed a commit to lcavadas/micronaut-data that referenced this pull request Jun 2, 2023
* Potential fix for count with joins

* Add more verification to the test

* Update AbstractRepositorySpec.groovy

* Undo formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pageable: incorrect totalSize of page when having one-to-many or many-to-many
2 participants