Skip to content
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

Expand does not work for deep includes #38

Open
rogerfar opened this issue Jul 4, 2014 · 2 comments
Open

Expand does not work for deep includes #38

rogerfar opened this issue Jul 4, 2014 · 2 comments

Comments

@rogerfar
Copy link

rogerfar commented Jul 4, 2014

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.

@beyond-code-github
Copy link
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.

@rogerfar
Copy link
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
Projects
None yet
Development

No branches or pull requests

2 participants