Open jiashengguo opened 2 months ago
Is there a workaround for this limitation at the moment?
I think there are two workarounds you can use:
Use field access policy to deny update.
isPaid @default(false) @deny('update', true)
But you need to make sure that isPaid is never provided when calling create
function.
Use ignore
isPaid @default(false) @ignore
The trade-off is that you have to use raw SQL to update it since it is excluded from prisma client.
For example, the
Payment
could be created by customer, but theisPaid
field should not be changed by customer, it could only be updated by the backend service after receive the webhook callback.However, the current field level access policy doesn't allow control for 'create' policy.