Uploaded image for project: 'Realm Dart SDK'
  1. Realm Dart SDK
  2. RDART-1025

Don't include fields when value is NULL (unset when null?)

      Problem

      Fields can be set "Optional", therefore the field with null as value will be saved in MongoDB.

      I prefer to not save the field at all and unset it instead.

      Solution

      Add a 'unsetWhenNull' annotation/SchemaProperty for class level and class member level. This indicates to have the property/field not stored in database when value is null.

      Alternatives

      No response

      How important is this improvement for you?

      Would be a major improvement

      Feature would mainly be used with

      Atlas Device Sync

            Assignee:
            nikola.irinchev@mongodb.com Nikola Irinchev
            Reporter:
            unitosyncbot Unito Sync Bot
            AD SDK Team 2
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: