Guys, is there a way I can add where: eq(users.email, email) to a findFirst query in DrizzleOrm?
I currently do it like this
10 Replies
Prisma ORM vs Drizzle | Prisma Documentation
Learn how Prisma ORM compares to Drizzle.
I am getting null
oh, TypeError: Cannot read properties of undefined (reading 'findFirst')
these are the relations
hmm
I even made the db with the schema as a type to get the relations export const db = drizzle<typeof schema>(client);
Do you know what might be causing the error?
@Vincent
Your db.query.users is somehow undefined
So I would start by checking the defninitions in db/index
kk
oh wait
maybe I need to generate the schema first
But I think I already did that
Well if you made any changes you do have to regenerate it Im pretty sure
yeah I think that is only for pushing the changes after to the db