My query results are correct, including referenced fields, but it is not sorted as specified(ascending). May be sorting is relevant only inside referenced data and not for the entire results, but then how do i sort the data that will be shown in the table?
Where is the problem?
let query= wixData.query(“TableA”)
.eq(“id”,id)
.include(“tableB”)
.ascending(“tableB.sortingField”)
.find()
.then( (res) => {
if (res.items.length > 0) {
let items = res.items;
$w(‘#tableResults’).rows = items;
} **else** {
// handle case where no matching items found