"RMB has offered views and sorting can of course work with that.
RMB-395 offers cross table queries but does not offer the ability to sort by joined (target) columns.
We need to extend the cross-table (join) support to also allow sorting by joined properties
This is illustrated by a unit test that had to be disabled: https://github.com/folio-org/mod-inventory-storage/blob/292063d90e7b4d5d0d4da038d2691232763633e5/src/test/java/org/folio/rest/api/InstanceStorageTest.java#L1337
CQL: title="Long Way to a Small Angry Planet*" sortBy holdingsRecords.permanentLocationId
This is likely not a real-life problem since we do not offer this specific sort criteria to the UI.
And it is not clear which permanentLocationId to use if an instance has several holdings.
Run the query against the API endpoint that contains the record with the sort field. Using the CQL example from above: Run this CQL query against the holdings API:
instance.title = "Long Way to a Small Angry Planet*" sortBy permanentLocationId
This is not exactly the same because an instance is returned multiple times if it has multiple holdings.