Ordering by relation in relational query
I am trying to sort on an attribute of a relation using the relational queries api, but as far as I can tell it is not supported?
Example:
Thanks,
J
Example:
Thanks,
J
await db.query.city.findMany({
orderBy: (country , { asc }) => [asc(country.name)],
with: {
country: true,
},
});