With Query mode, is possible filter by a related table?
Is possible using db.query to filter (where) using a related table?
Example:
I know we can use with, but with will return the result and we can filter the with, I wanna filter the actual query using the related table.
We can do using the select
2 Replies
Not currently, you can follow the discussion around this here: https://github.com/drizzle-team/drizzle-orm/discussions/1152
Basically, wait for the V2 release or just stick to manually building the queries with aggregations.
GitHub
Add nested filters for relational queries · drizzle-team drizzle-or...
I would like to create queries that filter by single values from a nested partial fields select. Imagine we have a users table with a one-to-one relation to a profile. The profiles table has a like...
There are ways. Take a look at this reply https://discord.com/channels/1043890932593987624/1303402726897750059/1303787075325136917