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

SortTranslator ignores snake-cased properties [DATAREST-1276] #1638

spring-projects-issues opened this issue Aug 13, 2018 · 1 comment


Copy link

@spring-projects-issues spring-projects-issues commented Aug 13, 2018

Édouard Hue opened DATAREST-1276 and commented

Given a @Document annotated class with the following attribute, and an according @RepositoryRestResource:

private Duration cookingDuration;

When issuing a GET request with ?sort=cooking_duration, the won't translate cooking_duration to cookingDuration and no sorting is performed.

When changing @JsonProperty("cooking_duration") to @JsonProperty("cooking-duration"), and doing a ?sort=cooking-duration request, JacksonMappingAwareSortTranslator properly resolves the property name.

It looks like is used to split the property name with _ and .. I can see the case for splitting on . for nested properties paths, but why would you split on underscores?

No further details from DATAREST-1276

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

No branches or pull requests

3 participants