Closed sarathas closed 2 years ago
Btw excluding the forwardRef does not work either as of right now, since the id is undefined.
Hello, @sarathas ! It needs to be investigated
@sarathas, Hi! Please, check v.1.1.4, which has fixes for forwardRef from the community developer. I hope this version fix your problem. And... PRs are welcome!
@sarathas is v1.1.4 or the newest v1.1.5 fix this problem?
It does, thank you! I hope I will find time to file a PR myself, should there be any further problems.
No, it not working
@sarathas, @pvhuy84, hello!
Feel free to send PR with the fix of this issue, if it is annoying for you. Unfortunately for now I don't have much time to fix specific errors.
When a service has a forwardRef in its constructor, the id is undefined. Attempting to create a transactional service with a forwardRef results in an error when the id is scanned if it is a repository:
Example for a service with forwardRefs:
The object in this case is a
ForwardReference
(provided by@nestjs/common
), so one could get theforwardRef
function of that object, execute it, and get the id by its name, for example.