简体   繁体   English

关于“ orderby”的Odata URL转换错误

[英]Odata URL conversion error on “orderby”

I need to show data in orderby 我需要按顺序显示数据

i have url like this and need to show data based on datewise 我有这样的网址,需要显示基于日期的数据

i tried like this 我尝试过这样

http://localhost:33396/values.svc/Names?$format=json&$expand=Address&$select=Address/PhoneNumber,Address/Pincode&$filter=Address/any(value:value/Pincode+eq+guid%27600045%27)+and+Address/any(value:value/country+eq+guid%27India%27)%20&$orderby=Address/Date+desc

but i am getting error like this 但我得到这样的错误

{"odata.error":{"code":"","message":{"lang":"en-US","value":"The parent value for a property access of a property 'Date' is not a single value. Property access can only be applied to a single value."}}}

how can i solve this 我该如何解决

The Address is a navigation property on Names right? 地址是名称上的导航属性,对吗? And from the error shows, I think Address is a collection. 从错误显示中,我认为Address是一个集合。 Property access can only be used on a single value, or it will get confused by using which of the items to get the specified property "Date" in the "Address" collection. 属性访问只能用于单个值,否则将通过使用哪个项来获取“地址”集合中的指定属性“日期”而感到困惑。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM