Sort invalid in fetch


#1

BasePhysicalMeasurementSeries.fetch({include:‘customWeatherStations.description’,order:‘customWeatherStations.description’})

returns

“message” : “Ordering BasePhysicalMeasurementSeries by collection customWeatherStations.description invalid.”

but

  1. customWeatherStations exists but can be empty (length 0)
  2. if i add exists(customWeatherStations.description) is the same_emphasized text_

BasePhysicalMeasurementSeries.fetch({filter:‘exists(customWeatherStations.description)’,include:‘customWeatherStations.description’,order:‘customWeatherStations.description’})

  1. the same err in 7.6 and 7.8

Why is invalid ? i thought it was a simple join !
Thanks
Fra


#2

the error says you cannot order using a collection field (i.e. customWeatherStations) try with another simple field (e.g. a string, a number) and the ordering should work fine.


#3

ok thanks, i think sortable disabled :stuck_out_tongue: