bageren
bageren
Explore posts from servers
DTDrizzle Team
Created by bageren on 8/12/2024 in #help
Using column of relation in where clause
I would like to do something like this:
database.query.tableOne.findMany({
with: {
tableTwo: {
columnOne: true
}
}
where: eq(tableTwo.columnOne, 10)
})
database.query.tableOne.findMany({
with: {
tableTwo: {
columnOne: true
}
}
where: eq(tableTwo.columnOne, 10)
})
The above query causes the following error: missing FROM-clause entry for table "tableTwo" Is there any way to do this?
3 replies