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

Serialization Issue With Camel Case Convention

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 8.1.0
    • Affects Version/s: 8.0.3
    • None
    • Dotnet Drivers

      When owned entities are being serialized in EF using CamelCaseElementNameConvention, the resulting MongoDB object is using the class name instead of the property name.  This is causing an exception if more than one property of the owning class has the same class.

      public class TestEntity
      {
          public string Id { get; set; }
          public string Name { get; set; }
          public SubEntity SubEntity1 { get; set; }
          public SubEntity SubEntity2 { get; set; }
      }
      
      public class SubEntity : ISubEntity
      {
          public int Value { get; set; }public string Text { get; set; }
      }

       

            Assignee:
            damien.guard@mongodb.com Damien Guard
            Reporter:
            andrew.kuntz@burke.com Andrew Kuntz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: