Skip to content

Expand does not work for deep includes #38

Open

Description

@rogerfar

I have an OData query like this:

http://localhost:41084/odata/Appointments?$expand=Person,Person/Address

This will give the following exception:

A specified Include path is not valid. The EntityType 'Site.Data.Appointment' does not declare a navigation property with the name 'Address'.

Which is correct because Appointment does not have a property Address, Person does, so it doesn't work very well with the deep includes.

Activity

  1. beyond-code-github commented on Jul 10, 2014

    @beyond-code-github
    Owner

    Hi @rogier21, expand in Linq to Querystring does not work in exactly the same way as described in the OData specification. Behind the scenes expand is mapped directly to the Include method and currently we don't support nested properties here.

    That said, I will try to take a look when I have some time over the next few weeks to see if it is possible to extend this for you.

  2. rogerfar commented on Jul 10, 2014

    @rogerfar
    Author

    Thanks! I think deep includes would be a nice to have anyway, even if it's not for the OData spec.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions