-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 query mapping resolution of properties using underscore within field name. #3607
Conversation
@@ -1170,7 +1170,7 @@ public String getMappedKey() { | |||
|
|||
if (sourceProperty != null && sourceProperty.getOwner().equals(entity)) { | |||
return mappingContext | |||
.getPersistentPropertyPath(PropertyPath.from(sourceProperty.getName(), entity.getTypeInformation())); | |||
.getPersistentPropertyPath(PropertyPath.from(Pattern.quote(sourceProperty.getName()), entity.getTypeInformation())); |
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.
Wouldn't it rather make sense to fix that issue in Commons? Property path creation does all sorts of string transformations and lookups (Decapitalize, owningType.getProperty(propertyName)
) while regex matching is a small part of the entire process.
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 is yes - for the upcoming service release I'd tough rather have the regression fixed in this project and investigate a fix for commons in the upcoming release cycle as it may lead to unintentional behaviour in other modules.
7f55001
to
9d74734
Compare
Follow-up: #3620 |
That's merged and backported now. |
Closes: #3601