Last post Mar 26, 2015 02:53 AM by Krunal Parekh
Member
405 Points
511 Posts
Mar 25, 2015 08:50 AM|Chris17|LINK
If I had a url like this: http://localhost:25***/odata/Category?$expand=Threads, it works fine but wen i tried this: http://localhost:25983/odata/Category?$expand=Threads($expand=Replies) I get the error: Term 'Threads($expand=Replies) is not valid in a $select or $expand expression.
From research I was told that si the way to nest odata $expand queries.
What do you think I did wrong.
Thanks
All-Star
15252 Points
2074 Posts
Mar 26, 2015 02:53 AM|Krunal Parekh|LINK
Hello Chris17,
According to this article this should work in oDataV4. Does Replies exists in Threads model?
http://stackoverflow.com/questions/25197023/querying-nested-navigation-properties-in-odata
I am not so familiar with odata but you might want to look at this specifications
http://docs.oasis-open.org/odata/odata/v4.0/os/abnf/odata-abnf-construction-rules.txt
Hope this helps.
With Regards,
Krunal Parekh
Member
405 Points
511 Posts
Odata nested $expand
Mar 25, 2015 08:50 AM|Chris17|LINK
If I had a url like this: http://localhost:25***/odata/Category?$expand=Threads, it works fine but wen i tried this: http://localhost:25983/odata/Category?$expand=Threads($expand=Replies) I get the error: Term 'Threads($expand=Replies) is not valid in a $select or $expand expression.
From research I was told that si the way to nest odata $expand queries.
What do you think I did wrong.
Thanks
Thanks for every help rendered.
ASP.Net Forum helped build me.
All-Star
15252 Points
2074 Posts
Re: Odata nested $expand
Mar 26, 2015 02:53 AM|Krunal Parekh|LINK
Hello Chris17,
According to this article this should work in oDataV4. Does Replies exists in Threads model?
http://stackoverflow.com/questions/25197023/querying-nested-navigation-properties-in-odata
I am not so familiar with odata but you might want to look at this specifications
http://docs.oasis-open.org/odata/odata/v4.0/os/abnf/odata-abnf-construction-rules.txt
Hope this helps.
With Regards,
Krunal Parekh
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue.