© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
DT
Drizzle Team
•
16mo ago
•
10 replies
Tommy
Using relation columns in where clause (Drizzle playground provided)
I have a one
-to
-one relationship with a schema defined like
:
https://drizzle.run/uwkkt8l10cgp5okr1r41tjfu
When I run that query
, I get the following error
column agent.deleted does not exist
column agent.deleted does not exist
. Why can
't you reference relation columns in a top
-level where clause
? Is there a better way to do this without using the
select
select
API with joins
?
Drizzle Run
undefined - Drizzle Run
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
Recent Announcements
Similar Threads
Using column of relation in where clause
DT
Drizzle Team / help
2y ago
Nested Where Clause in Many-to-Many relation using Query
DT
Drizzle Team / help
2y ago
Trouble using findMany with joined relation and where clause on relation
DT
Drizzle Team / help
2y ago
Where clause dependent on with relation
DT
Drizzle Team / help
2y ago