flat3 / lodata

The OData v4.01 Producer for Laravel
https://lodata.io/
MIT License
80 stars 27 forks source link

Order by nested single-cardinality property #835

Open miDeb opened 4 months ago

miDeb commented 4 months ago

I don't know if this is specified somewhere (I didn't find anything), but according to this user on stack overflow it should be possible to sort data by a nested property, such as Orders?$expand=Customer&$orderby=Customer/City. As far as I can tell this is not currently implemented in lodata (getting the error "The orderby parameter specified properties (...) that did not exist").

I know you can order the list of expanded properties by using a nested orderBy, in this case however I want to order the top-level list according to a nested property that is connected in a one-to-one relationship.