Skip to content

Ignore null properties by default #221

@Turnerj

Description

@Turnerj

Effectively default the behaviour of BsonIgnoreIfNull on all properties. If I understand it correctly, there shouldn't be any noticeable impact from this change besides less data in the DB.

More research may need to be done and asked about directly to MongoDB themselves.

Pros

  • Less storage used by MongoDB
  • Less data to send down the wire (AFAIK null properties are still sent - may depend on the driver)

Cons

  • If you depend on null being saved (which is definitely possible), it obviously won't which would break things. At minimum would need a way to opt-out of default ignoring of null values - whether that is MongoFramework-wide or type-wide would still need to be determined.

Notes

  • No known impact for querying performance in the DB because of ignored properties (eg. doesn't seem to impact indexing)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions