FetchXML Understanding Distinct

人盡茶涼 提交于 2020-06-16 18:59:19

问题


I am learning FetchXML and am currently new to it.

I tried looking at the documentation located here but I did not find it very helpful

What does this line mean:

<fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">

What does the mapping="logical" part mean? What does the distinct="true" part mean?


回答1:


As per FetchXML schema we have two enum values namely internal & logical for mapping attribute. We have to use mapping="logical" in our queries & internal may be for Platform usage (my guess).

    <xs:attribute name="mapping">
      <xs:simpleType>
        <xs:restriction base="xs:NMTOKEN">
          <xs:enumeration value="internal" />
          <xs:enumeration value="logical" />
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>

distinct="true" will remove the duplicate values in your resultset. This is similar to SQL concept.

Refer & read the documentation



来源:https://stackoverflow.com/questions/53228271/fetchxml-understanding-distinct

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!