invalid code in docs
I’m trying to run code similar to this from the drizzle docs but typescript does t even think “where” is a proper attritbute inside the with. Is this actually implemented?
await db.query.posts.findMany({
where: (posts, { eq }) => (eq(posts.id, 1)),
with: {
comments: {
where: (comments, { lt }) => lt(comments.createdAt, new Date()),
},
},
});
0 Replies