Peter
09/26/2022, 4:21 PMorderBy
clause does not take into account the relations joined with include
and where
?Nurul
09/27/2022, 10:57 AMAm I correct in assuming theYou can also sort by properties of a relation. For example, the following query sorts all posts by the author’s email addressclause does not take into account the relations joined withorderBy
andinclude
?where
const posts = await prisma.post.findMany({
orderBy: {
author: {
email: 'asc',
},
},
})
Let me know if I understood your question incorrectly.