Question: Is there plans for a way to only update modified fields of an object using Marshmallow

Issue #90 invalid
Todd Flora created an issue

Here is my scenario:

  1. We use a webclient written in JS and so when a user modifies an existing value for an object they only send back a JSON payload that just has the Identifying fields and fields with modified values.
  2. On the server I then use our DeSerializer to create an Object from this payload. Of course at this point the only fields that have values are those that were provided in the payload.
  3. Next I want to use Marshmallow to update the underlying database table with these changes. Currently Marshmallow tries to update all fields because there is no record in the Object of what was in the JSON and actually modified. It will therefore put NULL (for Nullable) fields or some default value (for Non Nullable) fields into database columns that I do not want to update.

Is there any plans to have an attribute similar to the Nullable attribute that tracks if a field was modified in an existing object, and then only update those fields?

Or is there a way to accomplish this currently?

Comments (4)

  1. Log in to comment