我有一个实体,[Part]
,具有导航属性[Representation]
在实体[Representation]
中有一个属性[Files]
,它是实体文件数组我的问题是:可以在Representation.Files具有filetype='pdf'
的零件上进行过滤我尝试过但失败了
Part?$filter=Representation/any(r:r/Files/filetype eq 'pdf')&$expand=representation
<EntityType Name="Part" BaseType="Entity">
<NavigationProperty Name="Representations" Type="Collection(Representation)"> </NavigationProperty>
</EntityType>
<EntityType Name="Representation">
<Property Name="AdditionalFiles" Type="Collection(RepresentationHyperlink)"> </Property>
</EntityType>
注意:
Files
是具有数组类型的属性,它是not一个navigation属性。
在OData v4中,以下将起作用:
...Part?$filter=Representation/Files/any(f:f/filetype eq 'pdf')&$expand=representation
any
功能在多个导航链接上起作用,因此它应该立即显示在它的后面,而不是它的前面。