-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OData $expand fails with Cosmos DB provider #23705
Comments
Please see this too, it should be the same error |
The thing I can't wrap my head around is how does The only logical way to handle this would be to generate a |
Well, the |
@Mishu if the subtitles are in a different document, then getting them in the same query isn't supported on Cosmos (see #16920). If the subtitles are part of the document (i.e. they represent a JSON fragment inside it), then there's no need to include/expand them - they are already automatically fetched. |
Expected Behavior
-Running OData query against EF Core Cosmos DB Provider with $expand would return OData result like this:
GET https://localhost:5001/odata/TestEntities?$expand=TestSubEntities
Observed behavior:
Exception with the following stack trace
Code to Reproduce the issue:
https://github.com/briangardner/CosmosOdata
Additional Commentary
OData $expand works when the entire result set is loaded into memory first using
.ToList().AsQueryable()
, but just returning the IQueryable directly from the DbSet throws the exception.Include provider and version information
EF Core version: 5.0.1
Database provider: Microsoft.EntityFrameworkCore.Cosmos
Target framework: .Net Core 3.1
Operating system: Windows 10
IDE: Visual Studio 2019 Version 16.8.3
The text was updated successfully, but these errors were encountered: