rcastell
09/21/2021, 9:29 PMtable1
WHERE id
= 1
AND EXISTS (SELECT * FROM table2
WHERE contacts
.id
= 3)Ryan
09/22/2021, 5:57 AMrcastell
09/22/2021, 11:33 AMrcastell
09/22/2021, 11:35 AMRyan
09/22/2021, 11:36 AMrcastell
09/22/2021, 11:57 AMrcastell
09/22/2021, 11:57 AMrcastell
09/22/2021, 12:00 PMrcastell
09/22/2021, 12:01 PMrcastell
09/22/2021, 12:02 PMRyan
09/22/2021, 12:16 PMrcastell
09/22/2021, 12:18 PMrcastell
09/22/2021, 12:30 PMRyan
09/22/2021, 12:44 PMawait prisma.rate.findFirst({
where: {
id: 1,
contracts: { id: 3 },
},
})
rcastell
09/22/2021, 1:02 PMRyan
09/22/2021, 1:22 PMAND
condition, so both of the conditions need to matchrcastell
09/22/2021, 1:31 PMrcastell
09/23/2021, 1:42 AMrcastell
09/23/2021, 1:42 AMrcastell
09/23/2021, 1:43 AMawait prisma.rate.findFirst({
where: {
id: 1,
contracts: { none: {} },
},
})
rcastell
09/23/2021, 1:43 AMrcastell
09/23/2021, 1:43 AMawait prisma.rate.findFirst({
where: {
id: 1,
contracts: { some: {} },
},
})
rcastell
09/23/2021, 1:44 AMrcastell
09/23/2021, 1:44 AM