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

Support SelectMany where subset comes from a single document

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 1.8.3
    • Component/s: Linq
    • None
    • Environment:
      .NET
    • Fully Compatible

      I would love to see this improvement make it into v2.0.

      Consider this basic class:

      class Book
      {
      // ....
      public List<Ratings> Ratings

      {get; set;}

      }

      And this query:

      var allGoodRatings =
      from b in mongo.Books
      from r in b.Ratings
      where r.Stars >= 4
      orderby r.Stars descending
      select r;

      AFAIK, this crashes with SelectMany not supported. It would be super easy to implement in the drive and as long as the second set is within each document it references, this could happen on the server and we don't have to resort to hacks where we double query it once on the db and then again on the client.

            Assignee:
            Unassigned Unassigned
            Reporter:
            mkennedy66996693 Michael Kennedy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: