Can I use "where" clause on joins ?
Hello !
I'm trying to query some data based on conditions. I know how to do it in prisma but I don't find a solution in drizzle.
In Prisma my query looks like:
In Drizzle I have currenlty this:
I've tried this:
I would like to use 'where' clause on fields that are in other tables.
Thanks for the help ! 😄
3 Replies
Hello, you can, but if there is many relation.
https://orm.drizzle.team/docs/rqb#select-filters
Drizzle ORM - Query
Drizzle ORM is a lightweight and performant TypeScript ORM with developer experience in mind.
Thanks !
I've done it like that:
Seems to work 🙂
Super! Could you share the schema please? I will try to do it with relational queries