Skip to content

WebApi: OData returns error on /Products?$top=120&$expand=ProductCategories #2197

@TripleNico

Description

@TripleNico

Currently i'm preparing the update from 3.2.2 to v.4.1.1. meaning i have to update the OData client from v3 to v4. During the adjustment i bumped into a problem that GET /odata/v1/Products?$top=120&$expand=ProductCategories returns the error

    "code":"","message":"An error has occurred.","innererror":{
      "message":"The 'ObjectContent`1' type failed to serialize the response body for content type 'application/json; charset=utf-8; odata.metadata=minimal'.","type":"System.InvalidOperationException","stacktrace":"","internalexception":{
        "message":"The specified type member 'MergedDataValues' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.","

Checking the OData Metadata than this should work? When i try it with a different object like GET /odata/v1/Customers?$top=120&$expand=CustomerRoleMappings then everything works as expected.

Am i overlooking something of is this not working in v4?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions