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 query mapping resolution of properties using underscore within field name. #3607

Closed
wants to merge 2 commits into from

Conversation

christophstrobl
Copy link
Member

Closes: #3601

@@ -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()));
Copy link
Member

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.

Copy link
Member Author

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.

@mp911de
Copy link
Member

mp911de commented Apr 9, 2021

Follow-up: #3620

@mp911de mp911de added this to the 3.1.8 (2020.0.8) milestone Apr 9, 2021
@mp911de mp911de added the type: regression A regression from a previous release label Apr 9, 2021
mp911de pushed a commit that referenced this pull request Apr 9, 2021
mp911de pushed a commit that referenced this pull request Apr 9, 2021
@mp911de
Copy link
Member

mp911de commented Apr 9, 2021

That's merged and backported now.

@mp911de mp911de closed this Apr 9, 2021
@mp911de mp911de deleted the issue/3601 branch April 9, 2021 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: regression A regression from a previous release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Criteria object not allowing to use field names with underscore in them
2 participants