samedi 18 avril 2015

using bookshelfjs to order results by a related table column

I have two tables I am querying with bookshelfjs using 'withRelated'. How do I sort the results by a column in the related table? For example I want to order all the results by rankingLinks.id



.fetchAll({withRelated: ['tickerSymbolLinks.tickerSymbol', 'rankingLinks', 'logoLinks.logo']})


Seems simple but banging my head against the wall on this one...


Aucun commentaire:

Enregistrer un commentaire