We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Assemblies affected
Describe the bug Grouping by a nested property of a derived type does not return the expected results. Scenario uncovered here
Reproduce steps Use the following code for a simple OData service to repro the issue
// Data models namespace Microsoft.AspNetCore.OData.E2E.Tests.DollarApply { public class MyCustomer { public int Id { get; set; } public MyAddress Address { get; set; } } public class MyAddress { public string Street { get; set; } } public class MyHomeAddress : MyAddress { public MyCity City { get; set; } // Complex property } public class MyCity { public string Name { get; set; } } } // Edm model var builder = new ODataConventionModelBuilder(); builder.EntitySet<MyCustomer>("MyCustomers"); builder.ComplexType<MyAddress>(); builder.ComplexType<MyHomeAddress>(); builder.ComplexType<MyCity>(); var model = builder.GetEdmModel(); // Controller public class MyCustomersController : ODataController { private static readonly List<MyCustomer> myCustomers = new List<MyCustomer> { new MyCustomer { Id = 1, Address = new MyHomeAddress { Street = "High Street", City = new MyCity { Name = "Belfast" } } }, new MyCustomer { Id = 2, Address = new MyHomeAddress { Street = "Moore Street", City = new MyCity { Name = "Dublin" } } } }; [EnableQuery] public ActionResult<IEnumerable<MyCustomer>> Get() { return myCustomers; } }
Data Model Shared in the "Reproduce steps" section
EDM (CSDL) Model Shared in the "Reproduce steps" section
Request/Response Request:
GET http://localhost/MyCustomers?$apply=groupby((Address/Microsoft.AspNetCore.OData.E2E.Tests.DollarApply.MyHomeAddress/City/Name))
Response:
{"value":[{"Address":{}},{"Address":{}}]}
Expected behavior The following response should be returned:
{"value":[{"Address":{"City":{"Name":"Belfast"}}},{"Address":{"City":{"Name":"Dublin"}}}]}
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Assemblies affected
Describe the bug
Grouping by a nested property of a derived type does not return the expected results. Scenario uncovered here
Reproduce steps
Use the following code for a simple OData service to repro the issue
Data Model
Shared in the "Reproduce steps" section
EDM (CSDL) Model
Shared in the "Reproduce steps" section
Request/Response
Request:
Response:
Expected behavior
The following response should be returned:
The text was updated successfully, but these errors were encountered: