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

Unexpected result when querying

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Blocker - P1 Blocker - P1
    • None
    • 0.9
    • None
    • None
    • Windows XP 32 bits

    Description

      Look at the 3 following queries:

      var items1 = db.GetCollection<EmailMessage2>().Linq().Where(x => x.Attribs.Count == 2).ToList();
      var items2 = db.GetCollection<EmailMessage2>().Find("{ _t: \"EmailMessage2\", Attribs: { $size:

      { $gt: 0 }

      } }").Documents.ToList();
      var items3 = db.GetCollection<EmailMessage2>().Linq().Where(x => x.Attribs.Count > 0).ToList();

      1 and 2 work fine but 3 brings no result back. I would expect that 3rd query return the same as 2nd (which indeed are the same query).

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            guirec Guirec
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: