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

LINQ queries don't work with fields/properties of type short (Int16)

    XMLWordPrintableJSON

Details

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

    Description

      To reproduce:

      public class C
      {
          public int _id;
          public short s;
      }
       
      var query =
          from x in collection.AsQueryable<C>()
          where x.s == 2
          select x;

      which results in the following exception:

      Unsupported where clause: ((Int32)x.s == 2)

      Attachments

        Activity

          People

            sridhar Sridhar Nanjundeswaran
            robert@mongodb.com Robert Stam
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: