Closed 0x0bit closed 6 months ago
This is probably relevant: https://stackoverflow.com/questions/60062318/how-to-inject-service-to-validator-constraint-interface-in-nestjs-using-class-va
Your problem is about how you use nest, it has nothing to do with the ORM. You would get a better answer from nest community.
My project directory is as follows
For special reasons, I need a custom validator, and to query the database in the validator, I put the custom validators under
/src/common/validators
, The code of is-valid-provincial.ts Is as follows:But every time I got an error, I couldn't find the findOne method for Entity, even though I used service
What am I supposed to do here? I hope you can help me. Thank you very much