Hi everyone,
I recently switched to a dynamic data source approach in my NestJS application. However, I'm encountering an issue with custom validators that were previously relying on a static ORM setup.
When one of these validators is triggered, I get the following error:
TypeError: Cannot read properties of undefined (reading 'getRepository')
at EntityExistsConstraint.validate (/app/src/shared/validators/entity-exists.validator.ts:24:40)
To address this, I tried injecting the EntityManager with a REQUEST scope in the validator, similar to how I handled services. Unfortunately, the error persists
Has anyone faced a similar issue or can offer advice on how to correctly configure class-validator to work in the context of a dynamic data source?
Thanks in advance for any help!