- edited description
Question: Is there plans for a way to only update modified fields of an object using Marshmallow
Issue #90
invalid
Here is my scenario:
- 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.
- 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.
- 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)
-
reporter -
repo owner Thanks for all your valuable feedback and issue reports but please use our google group (https://groups.google.com/forum/#!forum/spring4d) for Q&A and leave the issue tracker for concrete bug reports or feature requests.
-
repo owner - changed status to invalid
Question was posted on: https://groups.google.com/forum/#!topic/spring4d/Gz1KcOeEO4o
Thanks!
-
reporter No Problem,
My bad for not knowing about the google group.
Todd.
- Log in to comment