Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-41

Bug in the query translator

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

      I spotted a bug in the query translator (MongoQueryTranslator.cs). The code from line 288 to 294 should be similar to the one for field access, it should be:

      case MemberTypes.Property:
      var propertyInfo = (PropertyInfo)m.Member;
      valueStack.Push(propertyInfo.GetValue(((ConstantExpression)m.Expression).Value, null));
      break;

      Thanks
      Flavien

            Assignee:
            craig.wilson@mongodb.com Craig Wilson
            Reporter:
            flavien Flavien
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: