[CSHARP-2711] only fields are allowed in a $sort when ordering by a nullable field Created: 25/Aug/19 Updated: 12/Nov/21 Resolved: 25/Sep/19 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | None |
| Affects Version/s: | 2.9.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Andrej Zolger | Assignee: | Dmitry Lukyanov (Inactive) |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Azure cloud (Windows) |
||
| Issue Links: |
|
||||||||
| Description |
|
I am using OData against the MongoDB IQueryable collection and it works fine but when I try to sort by a nullable field it breaks with: only fields are allowed in a $sort when ordering by a nullable field If I convert that field to not nullable it works fine. IMongoQueryable<T> query = queryOptions == null? entities.AsQueryable() : queryOptions.ApplyTo(entities.AsQueryable()) as IMongoQueryable<T>; Error:
{{}} Did anyone have a similar experience? Is there a workaround for this? {{}} Nuget: {{}}
{{}} |
| Comments |
| Comment by Dmitry Lukyanov (Inactive) [ 25/Sep/19 ] |
|
Feel free to reopen this ticket if it's still relevant for you |
| Comment by Dmitry Lukyanov (Inactive) [ 18/Sep/19 ] |
|
Hello zolgera81@gmail.com, I've tried to reproduce your situation, but without any results. |