Closed fauh45 closed 2 years ago
Yes currently JSON isn't supported, thanks for reporting it. We will look into it.
If you would like to raise a PR, we will merge it timely!
I did see you guys have skipFields options for updateHandler, could I just add that configuration in the default handler alongside the delete options that's already there?
This question would be for @ogroppo , but go ahead and see if it works, you might see similar cases in the other data providers.
For sure, currently testing it right now, I'll let you guys know my solution.
Opened a new PR ( #14 ) to fix my use cases, the solution is simple, but might not be general enough for all of the use cases.
Currently I'm developing apps that require one of the field to be the type of JSON. (Prisma Reference)
The problem is every time the data is updated to the database, the JSON field would not be updated. I've done some digging and found this code at the file
updateHandler.ts
.Link to code
I think the problem is, that this library thinks the JSON field is actually a relation to another model, so it is skipped. I think there should be a way to differentiate it, or at least have a configuration to allow a particular field on a model to be updated.