gpt4 book ai didi

select - odata - 结合 $expand 和 $select

转载 作者:行者123 更新时间:2023-12-03 11:11:14 24 4
gpt4 key购买 nike

在 odata v4.0 中是否有将 $expand 和 $select 组合在一起的选项?

I have a scenario wherein I'm trying to get specific columns in productItemChoices and item. The below query will give you all the columns in productItemChoices. I only need one column in the productItemChoices


odata/Products(08f80b45-68a9-4a9f-a516-556e69e6bd58)?$expand=productItemChoices($expand=item($select=name))

最佳答案

在经历了很多时间之后,我终于得到了答案。我们可以嵌套selectexpand使用 ;作为分隔符,类似于

odata/Products(8)?$expand=choices($select=col1,col2;$expand=item($select=name))

这记录在 OData v4 $expand documentation 中.该文档还列出了其他有用的示例,例如
Categories?$expand=Products($filter=DiscontinuedDate eq null)
Categories?$expand=Products/$count($search=blue)

关于select - odata - 结合 $expand 和 $select,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28326800/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com