-
Notifications
You must be signed in to change notification settings - Fork 202
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
Consider @Where annotation for count query #2323
Conversation
@@ -30,3 +30,4 @@ src/main/docs/resources/css/*.css | |||
src/main/docs/resources/js/*.js | |||
src/main/docs/resources/style/*.html | |||
src/main/docs/resources/img/micronaut-logo-white.svg | |||
**/.micronaut/test-resources/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some test-resources files started showing up recently, it's safe to ignore these paths.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What files are those?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's indeed safe to ignore these: the Gradle plugin behavior has been aligned to that of the Maven plugin which creates .micronaut
directories. This also has the side effect of allowing to use test resources even if not delegating builds to Gradle.
@@ -255,7 +255,7 @@ protected MethodMatchInfo build(MethodMatchContext matchContext) { | |||
} | |||
countQuery.join(joinPath.getPath(), joinType, null); | |||
} | |||
countQueryResult = queryBuilder.buildQuery(countQuery); | |||
countQueryResult = queryBuilder.buildQuery(annotationMetadataHierarchy, countQuery); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the cause of the issue, when building count query method annotation metadata is not passed so we don't have information about @Where
annotation.
This was probably not done by mistake, maybe wanted to avoid @Join
or something else but I tested and count query with this change still does not consider joins so should be safe. Anything else @dstepanov could perhaps be the reason why annotation metadata was not passed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably a mistake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably delete all the methods without the annotations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was mainly used from tests, removed it df6d6db
Kudos, SonarCloud Quality Gate passed! |
Should fix #2162