omar-dulaimi / prisma-class-validator-generator

Prisma 2+ generator to emit typescript models of your database with class validator
MIT License
65 stars 11 forks source link

Don't use `IsDefined` as it conflicts with `skipMissingProperties`, making partial updates impossible #9

Closed Morriz closed 2 months ago

Morriz commented 1 year ago

Bug description

The output is now not usable for partial updates, as the validator requires props with IsDefined(), and skipMissingProperties does not work on them: https://github.com/typestack/class-validator#skipping-missing-properties

How to reproduce

Expected behavior

No response

Prisma information

Environment & setup

Prisma Version

Morriz commented 1 year ago

I created a feature request upstream: https://github.com/typestack/class-validator/issues/1726

Morriz commented 1 year ago

And published a fork in the mean time not using IsDefined: https://www.npmjs.com/package/prisma-class-validator-generator-partial

omar-dulaimi commented 1 year ago

Hey @Morriz I apologize for not being as active here, I'm busy with job search and interviews that I don't get enough time to work on the many generators I have published so far. I hope you can understand that.

Also, you should have sent a PR instead of a whole fork and release lol.

Morriz commented 1 year ago

Got it. No PR as my fix is temporary and upstream should fix the problem.

omar-dulaimi commented 2 months ago

Closing for now, feel free to open in case something changes