I'm getting circular dependency problems because each table relation is declared from the table file
Is there a better way to declare relations ?
What I ended up doing was declaring all my relations in a separate file "relations.ts".
![](https://cdn.answeroverflow.com/1136583543011676200/Capture_decran_2023-08-03_a_10.56.35.png)
![](https://cdn.answeroverflow.com/1136583543250763826/Capture_decran_2023-08-03_a_10.57.07.png)
2 Replies
And even though I could have multiple "relation" files for subscriptions/plans/users etc so that everything does not end up being in one big relation file, it would just feel much nicer to have the relations the closest possible to the table declaration.
I'm facing same issues, how did you fix it?
Mine was seperate relation file and table file