SAP CRM OData模型里的addressable为true的含义

Sent: Wednesday, December 3, 2014 6:35 PM

Subject: what does addressable = true mean

Opportunity Odata model里有三个entity set mark成address = true:

SAP help里的解释是mark成address = true的entity set能够直接通过url访问,比如如下两个例子:document history和maxhit.


而对于其他通过$expand访问的entity set, 比如Attachments,product等等,虽然表面上也是通过url直接访问:

但是根据SAP help里的定义,framework在访问这些entity set时,总是先拿到root entity set,即Oppportunity,再执行expand操作。

下面的例子是Framework处理documentHistory的读操作:框架直接call GET_ENTITYSET method直接根据传入的guid将history返回:

但是对于这个expand的url而言:
https://wdciw01.wdf.sap.corp:7080/sap/opu/odata/sap/CRM_OPPORTUNITY/Opportunities(guid’3440B5B1-73AE-1ED4-9ED9-F49FBCEA5CC2’)?$expand=Products,ChangeDocs,Competitors,OpportunityLogSet&sap-client=001

框架的处理是先从Opportunity出发:


line 28先读取Opp header,再call line 41的read function 读取需要expand的sub entity set信息。

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

发布了6767 篇原创文章 · 获赞 646 · 访问量 112万+

猜你喜欢

转载自blog.csdn.net/i042416/article/details/104511074