aveatrex
aveatrex
DTDrizzle Team
Created by aquarazorda on 8/25/2023 in #help
Why it's not possible to use `where` here?
but i think you can work around it in your case if you go from account
db.query.accountSchema.findMany({
where: // filter with vendorId
with: {
accountContactSchema: {
with: {
authenticatedUser: ...
}

}
}
})
db.query.accountSchema.findMany({
where: // filter with vendorId
with: {
accountContactSchema: {
with: {
authenticatedUser: ...
}

}
}
})
7 replies
DTDrizzle Team
Created by aquarazorda on 8/25/2023 in #help
Why it's not possible to use `where` here?
7 replies
DTDrizzle Team
Created by aquarazorda on 8/25/2023 in #help
Why it's not possible to use `where` here?
but if you want to retrive the account of an accountContact, all you need is
with: { account: true }
with: { account: true }
and you would use where on findMany to filter by the accountContact
7 replies
DTDrizzle Team
Created by aquarazorda on 8/25/2023 in #help
Why it's not possible to use `where` here?
you can't use where with a one relation
7 replies