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

Bug in the query translator

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: