Handling self referencing foreign keys
I have the following code but am getting an error that says
'people' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.ts(7022)
How should I handle a self referencing foreign key like in my example below?
2 Replies
Does this work?
For reference, got this solution from https://orm.drizzle.team/docs/joins#aliases--selfjoins
Joins [SQL] – DrizzleORM
Drizzle ORM | %s
yup that works thank you!