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

Allow >, >=, <, <= comparison on array size

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • 1.9
    • 1.8.1
    • None
    • None
    • C#, .NET 4.5, Linq

    Description

      Noticed when trying to build a query that only equals and not equals is supported. It is possible to implement this using JohnnyHK's answer from this post:

      http://stackoverflow.com/questions/7811163/in-mongo-db-how-do-i-find-documents-where-array-size-is-greater-than-1

      // Find all docs that have at least a second name array element.
      db.accommodations.find({'name.1': {$exists: true}})

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            roysvork Pete Smith
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: