Circular Dependency TypeORM - Up to date doc examples? #355
Unanswered
chronos1nside
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Hi @chronos1nside , thank you for the kind words. This is a tricky situation (circular deps is always tricky) so would you like to setup a call so we can brainstorm? And yes, that portion in the docs is outdated :(. I'll make an update asap |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First of all, thank you for this awesome project, it's been a life savior and reducer of code haha
So, here's the thing...
I'm running into some issues when mapping from and to TypeORM entities, mainly with the relations between two or more entities and I have a question:
Is this section of the documentation up to date? https://automapperts.netlify.app/docs/plugins-system/classes-limitations/
I'm only asking because I'm trying to follow the approach of "mapWith()" to try to avoid circular dependency using TypeOrm Entities but I keep facing some errors, even with the examples provided.
This is what I got:
**** Argument of type '() => typeof Person' is not assignable to parameter of type 'string | Constructor'
I tried something like this, but "lost" the mapper in the process.
I'm running the latests version of all the packages and on a NestJS project, also updated, so I'm good with that.
I hope I made myself clear if not, feel free to ask questions.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions