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
No description
No description
2 Replies
pxL
pxL8mo ago
In index.ts Try:
schema: {...deals, ...documents}
schema: {...deals, ...documents}
LukasGaeb
LukasGaebOP8mo ago
when trying it like this, it doesnt work at all... the intellisense is just broken then
Want results from more Discord servers?
Add your server