As an example:
/api/indicators?sort=widgets.title
results in this query:
SELECT "indicators".* FROM "indicators" LEFT JOIN widgets AS widgets_sorting ON widgets_sorting.id = indicators.indicator_id ORDER BY widgets_sorting.title asc
As you can see, it should be indicators.id and not indicators.indicators_id
This doesn't happen if sort is done by a has_one relation.
As an example:
/api/indicators?sort=widgets.titleresults in this query:
SELECT "indicators".* FROM "indicators" LEFT JOIN widgets AS widgets_sorting ON widgets_sorting.id = indicators.indicator_id ORDER BY widgets_sorting.title ascAs you can see, it should be
indicators.idand notindicators.indicators_idThis doesn't happen if sort is done by a has_one relation.