Uploaded image for project: 'Entity Framework'
  1. Entity Framework
  2. EF-188

Relax owned collection must exist as element in Bson rule

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Unknown Unknown
    • 8.2.3
    • Affects Version/s: None
    • None
    • None
    • Dotnet Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      We currently allow users to specify whether a owned entity must exist or not using the EF navigation api such as mb.Entity<Customer>().Navigation(c => c.PrimaryAddress).IsRequired(false) however EF does not permit us to do the same for collections.

      Cosmos by default permits missing owned collections (and in some cases initializes them).

      We should relax our rule as so that if a Bson element is missing that would have contained an owned collection we instead allow null to pass through.

      Initialization to an empty list or array will continue to be covered in EF-164.

            Assignee:
            damien.guard@mongodb.com Damien Guard
            Reporter:
            damien.guard@mongodb.com Damien Guard
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None