IBsonSerializer for a mapped member should flow through expression tree when result type is the same.

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 2.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Given a class of type Person

      class Person
      {
        [BsonRepresentation(BsonType.ObjectId)]
        public string Id {get; set;}
      }
      

      The aggregation framework expression trees are currently losing the ObjectId representation.

      .Project(x => new { MyId = x.Id })
      .Match(x => x.MyId == "54b73ce5e9080a3534370443")
      

      The Match should render the "54b73..." as an objectId in the query, but instead it renders it as a string because we lost the serialization information when we did a projection.

              Assignee:
              Unassigned
              Reporter:
              Craig Wilson
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: