We are using a very simple setup of @RepositoryRestResource
on top of a PagingAndSortingRepository
connected to a postgres database. Also we have configured spring.jackson.property-naming-strategy=SNAKE_CASE
to return pretty json. It was all fine and dandy until we started sorting. As we have discovered - sorting requires us to provide the actual class field names (which we of course have in camel case):
get("/thing?sort=dateCreated,desc")
And when we try to do javascript friendly
get("/thing?sort=date_created,desc")
it fails miserably because jpa tries to split the parameter by the underscore.
Is there a simple way to have the path params the same format as we have them in the json that we are returning?