Details
-
Bug
-
Resolution: Cannot Reproduce
-
Major - P3
-
None
-
2.0
-
None
-
None
Description
Using below 2 queries generate the same projection, but the results are different:
// works
|
collection.Find(x => x.Pets.Any(p => p.Name == "Jack")
|
.Project(x => x.Pets.ElementAt(-1))
|
.ToListAsync();
|
|
|
// doesn't work
|
collection.Find(x => x.Pets.Any(p => p.Name == "Jack")
|
.Project(Builders<Person>.Projection.Include(p => p.Pets.ElementAt(-1)))
|
.ToListAsync();
|