[CSHARP-994] OData $expand and $top query options together with PageSize throws a MongoDB.Driver.MongoQueryException Created: 11/Jun/14 Updated: 08/Feb/23 Resolved: 04/May/15 |
|
| Status: | Closed |
| Project: | C# Driver |
| Component/s: | Linq |
| Affects Version/s: | 1.9.1 |
| Fix Version/s: | 2.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Dimitar Moev | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
.NET 4.5 |
||
| Issue Links: |
|
||||||||
| Epic Link: | Rewrite Linq | ||||||||
| Description |
|
I have a OData controller with Get action which has a QueryableAttribute with set PageSize property: [Queryable(PageSize=5000)] repository.All() - returns MongoQueryable when I make a GET request to my OData controller with following query: I get MongoDB.Driver.MongoQueryException exception with message: If I remove $top or $expand option from my request or remove PegeSize from QueryableAttribute then I get successful response |
| Comments |
| Comment by Dimitar Moev [ 05/May/15 ] |
|
I am using $expand to load and array of sub-documents. For example the { ], Sometimes the number of attributes could be very large, so I want to load 1. http://localhost/TimeSeries?$expand=Attributes 2. http://localhost/TimeSeries Thanks From: Craig Wilson closed This is fixed by However, I notice the $expand in your url and, since MongoDB doesn't Craig MongoDB.Driver.MongoQueryException ---------------------- ______________________________________________________________________ |
| Comment by Craig Wilson [ 04/May/15 ] |
|
This is fixed by However, I notice the $expand in your url and, since MongoDB doesn't support relationships between collections, I'm not sure how that is getting used. Craig |