Aljoscha
DTDrizzle Team
•Created by Aljoscha on 4/1/2025 in #help
Problems querying with findMany and relations
Hi. I started trying out drizzle (0.41.0) today and sql-like queries work pretty well. Unfortunately I have a problem with the findMany query when including relations.
I created a schema "studentsTable" and set a simple one-to-many relation at "dormId" to the schema "dormsTable". When querying with findMany() and trying to get the relation I always get
⨯ TypeError: Cannot read properties of undefined (reading 'referencedTable')
My query:
I added the schema to drizzle() initialization:
What am I doing wrong?
Thank you very much6 replies