where filter returning typescript error when nested within a with
the where inside the with is giving a type error of
any guidance would be amazing
4 Replies
Filtering by nested relations was removed in v0.28: https://github.com/drizzle-team/drizzle-orm/releases/tag/0.28.0
GitHub
Release 0.28.0 · drizzle-team/drizzle-orm
Breaking changes
Removed support for filtering by nested relations
Current example won't work in 0.28.0:
const usersWithPosts = await db.query.users.findMany({
where: (table, { sql }) => (...
hmmmm thank you! weird it still technically works tho
https://orm.drizzle.team/docs/rqb#select-filters and in the docs it shows i can still do this
Drizzle Queries - DrizzleORM
Drizzle ORM | %s
also wondering why the docs stills show this possible. the docs are out of date?
oh nvm, the docs aren't clear https://discord.com/channels/1043890932593987624/1113148605142945822/1151552569408229496
it's actually filtering comments then joining, not filtering on the joined table