I have a problem with drizzle orm, when i use multiple relations() for easier use, intellisense and typesafety goes wrong.
My example is below.
I have following entities exported all in index.db.ts file.
Here is my definition for categories with relations.
Everything is fine and i see typesafety and intellisense.
However when i add second/different/another relation for different entity like this
I loose the typesafety and intellisense.
Does anybody have any idea why or encountered this case?
I have a problem with drizzle orm, when i use multiple relations() for easier use, intellisense and typesafety goes wrong.
My example is below.
I have following entities exported all in index.db.ts file.
Here is my definition for categories with relations.
Everything is fine and i see typesafety and intellisense.
However when i add second/different/another relation for different entity like this
I loose the typesafety and intellisense.
Does anybody have any idea why or encountered this case?
Share Improve this question asked Mar 31 at 13:22 StykPohlavssonStykPohlavsson 3047 silver badges15 bronze badges1 Answer
Reset to default 0I have found finally the answer. Its here in another post.
How to declare self-referencing foreign key with Drizzle ORM
I was self referencing categories table with parentCategoryId