t3stack, multi-file schema, can't use with.
I am using a multi-file schema for my project and the tables are generated appropriately, and the relations are also good. but when trying to use db.query with a "with" inside the query, i am getting an error: Cannot read properties of undefined (reading 'referencedTable')
When doing the same for a single-file schema it works. I suspect that it has to do with the configuration i am using but i cant figure it out. help is very appreachiated. Attached is a screenshot of where i believe is the error (because when importing * as schema from schema for the schema it works). also attached is my drizzle.config.ts


2 Replies