naourass
naourass
Explore posts from servers
DTDrizzle Team
Created by naourass on 10/11/2024 in #help
Get the count of a nested relation in findMany()
Is it currently possible to get the count of a nested relation in findMany() query?
const data = await db.query.docs.findMany({
with: {
articles: {
with: { attachments: { count: "Count of attachments here" } }
}
}
});
const data = await db.query.docs.findMany({
with: {
articles: {
with: { attachments: { count: "Count of attachments here" } }
}
}
});
1 replies