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

Fix Querydsl conversion for properties with explicit target type. #4382

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

christophstrobl
Copy link
Member

This PR makes sure to convert values, for Querydsl predicates pointing to a property with an explicitly annotated target type, into the desired format.

Resolves: #4359

This commit makes sure to convert values, for Querydsl predicates pointing to a property with an explicitly annotated target type, into the desired format.
if (!isReference(path)) {
if(property != null && property.hasExplicitWriteTarget()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder why this is necessary as the Querydsl predicate is rendered into our Query object that is then converted using the domain type information.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, the query mapper will take care of the conversion. So it works fine on current main, let me get back to the reporter to see if that's an issue with earlier versions. I would have argued that SpringDataMongodbSerializer should already consider this based on its description, so it's worth updating that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

QueryDSL-style queries don't honor targetType @Field attribute
2 participants