© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
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
undefined - Drizzle Run
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Using column of relation in where clause
Drizzle TeamDTDrizzle Team / help
2y ago
Nested Where Clause in Many-to-Many relation using Query
Drizzle TeamDTDrizzle Team / help
2y ago
Trouble using findMany with joined relation and where clause on relation
Drizzle TeamDTDrizzle Team / help
2y ago
Where clause dependent on with relation
Drizzle TeamDTDrizzle Team / help
2y ago