[CSHARP-2441] LinqToMongo.Inject does not work with 2dsphere Created: 27/Nov/18 Updated: 10/Dec/18 Resolved: 10/Dec/18 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Linq |
| Affects Version/s: | 2.7.2 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Frederic Samson [X] | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
We used to be able to do the following in version 2.4 :
Now in 2.7, when we do this :
we get the following error: $near is not allowed inside of a $match aggregation
Query being injected:
|
| Comments |
| Comment by Ian Whalen (Inactive) [ 10/Dec/18 ] |
|
Hi Freddy240, the old LINQ was based on Find() while the new implementation is based on Aggregate(), and Server aggregation does not support $near inside of a $match. Given that we do not plan to revert to using Find() in LINQ, this is not something we will be able to fix unless the Server adds support for it. You could work around this using Find(). |
| Comment by Ronaldo Martinez [ 05/Dec/18 ] |
|
+1 I'd like to keep using IQueryable but because of this i can't. |