Adrien Wald
08/18/2022, 2:57 PMawait prisma.section.findMany({
where: {
OR: identifiers.map(({ resourceId, index }) => ({
resourceId,
index
}))
}
})
Nurul
08/19/2022, 1:26 PMresourceId
and index
, correct?
Based on this the query which you have shared looks good.Nurul
08/22/2022, 11:07 AMAdrien Wald
08/22/2022, 11:11 AMresourceId
and index
. Looks like it works 🙂 just wondering if there's a "better" way of doing itAdrien Wald
08/22/2022, 11:12 AMfindMany({ where: { id: { in: ['id1', 'id2'] } } })
Adrien Wald
08/22/2022, 11:13 AMfindMany({
where: {
resourceId_index: {
in: identifiers
}
}
})
Nurul
08/22/2022, 11:14 AM