I cant get Drizzle with Queries to work...
I'm converting a project from prisma, and I'm a bit stuck on the simplest of queries...
This returns records:
while this:
throws
TypeError: Cannot read properties of undefined (reading 'referencedTable')
The Session table:
The User table:
(there was also a relations.ts
file created during introspection that is not imported anywhere)
I'm sure I've just missed something in the documentation, but I've been stuck on this for almost a day now.1 Reply
PS: I can get the records using
.leftJoin
, but the with:
syntax seemed like an easier transition path from prisma's include:
syntax...
Nevermind, figured it out. I needed to initialize db with both schema and relations: