DATAREST-976 - Embedded properties are now considered in sort property paths.

We now allow sorting by properties of embedded objects. An embedded object is not linkable to a root object but embedded in the resource itself. If any part of the sort property path points to a linkable association, the whole sort property path is discarded silently and not used for sorting any further.

Original pull request: #251.
This commit is contained in:
Mark Paluch
2017-01-10 14:19:02 +01:00
committed by Oliver Gierke
parent 629ca4e33d
commit ffe96e4079
7 changed files with 63 additions and 16 deletions

View File

@@ -127,4 +127,4 @@ To have your results sorted on a particular property, add a `sort` URL parameter
curl -v "http://localhost:8080/people/search/nameStartsWith?name=K&sort=name,desc"
----
To sort the results by more than one property, keep adding as many `sort=PROPERTY` parameters as you need. They will be added to the `Pageable` in the order they appear in the query string.
To sort the results by more than one property, keep adding as many `sort=PROPERTY` parameters as you need. They will be added to the `Pageable` in the order they appear in the query string. Results can be sorted by top-level and nested properties. Use property path notation to express a nested sort property. Sorting by linkable associations (i.e. resources to top-level resources) is not supported.