Details
-
New Feature
-
Resolution: Unresolved
-
Major - P3
-
None
-
None
-
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" },