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資訊。
本文來自雲栖社群合作夥伴“汪子熙”,了解相關資訊可以關注微信公衆号"汪子熙"。