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

Support Left Outer Joins

    • Type: Icon: New Feature New Feature
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Linq
    • Labels:
      None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      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" }

      ,

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

              Created:
              Updated: