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

Support Left Outer Joins

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Linq
    • None

    Description

      example:

          var query = from p in Db.GetCompanyCollection<AwardProviderProduct>(companyIdentifier).AsQueryable()
                      join o in Db.GetGlobalCollection<Product>() on p.Sku equals o.Sku
                      where p.Reference[ProductReferenceType.AwardchoiceSource.ToString()] == "NORC"
                      select new AwardProviderProduct()
                      {
                        
                          Sku = p.Sku,
                        
                      };
      

      creates

       
      db['terryberry-AwardProviderProduct'].aggregate(
      [
      { "$lookup" : { "from" : "Product", "localField" : "Sku", "foreignField" : "Sku", "as" : "o" } }, 
      { "$unwind" : "$o" },
      { "$project" :
      {
           "Sku" : "$Sku"
      }
      }       
      ,
      {"$match" : { "Reference.AwardchoiceSource" : "NORC" }} ])
      
      

      The query does not work because of the seemingly useless unwind statement

      Unknown macro: { "$unwind" }

      ,

      Attachments

        Activity

          People

            Unassigned Unassigned
            dcumings@terryberry.com Dan Cumings
            Votes:
            7 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: