Difference between where in Prisma

Hello, is there a difference between this beside how you write it?
await prisma.user.count({
where: {
post: { // between this
id: postId
}
post_id: postId // and this
}
})
await prisma.user.count({
where: {
post: { // between this
id: postId
}
post_id: postId // and this
}
})
2 Replies
Neto
Neto15mo ago
direct difference, no just allow you to do more queries against the relationship
Neto
Neto15mo ago
Prisma
Filtering and sorting (Concepts)
Use the Prisma Client API to filter records by any combination of fields or related record fields, and sort the results.