How are you supposed to get triple-nested where queries to work?

db.query.users.findMany({
where: undefined,
with: {
orders: {
where: undefined,
with: {
orderItems: {
where: undefined,
with: {
details: {
where: undefined,
^^^^^^^^^^^^^^^^ WHERE IS NOT A VALID KEY
with: {}
}
}
}
}
}
}
});
db.query.users.findMany({
where: undefined,
with: {
orders: {
where: undefined,
with: {
orderItems: {
where: undefined,
with: {
details: {
where: undefined,
^^^^^^^^^^^^^^^^ WHERE IS NOT A VALID KEY
with: {}
}
}
}
}
}
}
});
1 Reply
Angelelz
Angelelz10mo ago
Where is not valid on ONE relation, are there many details in orderItems? If yes, then it might be a bug If there is one detail per orderItem, then that is correct
Want results from more Discord servers?
Add your server