Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Multiple .where() calls with $dynamic not working - Drizzle Team
DT
Drizzle Team
•
3y ago
•
19 replies
jz
Multiple .where() calls with $dynamic not working
When adding multiple
.where()
.where()
calls to a query created with
.$dynamic()
.$dynamic()
only the last
.where()
.where()
call gets applied to the resulting query
.
I put together the following example that adds two
.where()
.where()
calls but only the last one is applied
. You can see the resulting query in the console
.
https://codesandbox.io/p/sandbox/charming-herschel-8c9rk6?file=%2Findex.js%3A7%2C11
Drizzle Team
Join
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
$dynamic with multiple groupBy statements
DT
Drizzle Team / help
3y ago
Dynamic where clause
DT
Drizzle Team / help
3y ago
Dynamic where query
DT
Drizzle Team / help
3y ago
Multiple Where Clauses
DT
Drizzle Team / help
2y ago