[ ] Regression
[ ] Bug report
[ ] Feature request
[x] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
I'm having the following situation:
2 modules - App.module && User.module.
App module initializes the TypeORM async connection as below
I bypassed the problem in a stupid (I think its stupid, but correct me if I'm wrong) way, by injecting in the repository the Repository, and using the this.userRepo for the base functionalities.
I say it feels stupid, because in this case I wouldn't need to extend from the Repository, because I could do this injection in any other service, and don't see the need to have a repo anymore.
I found a lot of similar issues online, people either fixed their issues with a provider (Doesn't work for me), or bypassed the issue in some way, or figured they're doing something stupid.
I expect that my problem is also generated by some stupid thing I did, that I'm missing right now.
I'm submitting a question. (subject)
Current behavior
I'm having the following situation:
The Users repository looks as follows:
The bootstrap goes smoothly, but as soon as I make my call that would trigger the above repository function
getUserById
to be called, I get an error:Expected behavior
I would expect that the app would work, and the findOne would be defined, since the class extends the base Repository class.
Minimal reproduction of the problem with instructions
Code as above
Environment
I bypassed the problem in a stupid (I think its stupid, but correct me if I'm wrong) way, by injecting in the repository the Repository, and using the this.userRepo for the base functionalities.
I say it feels stupid, because in this case I wouldn't need to extend from the Repository, because I could do this injection in any other service, and don't see the need to have a repo anymore.
I found a lot of similar issues online, people either fixed their issues with a provider (Doesn't work for me), or bypassed the issue in some way, or figured they're doing something stupid. I expect that my problem is also generated by some stupid thing I did, that I'm missing right now.