SAP CRM OData模型裡的addressable為true的含義

i042416發表於2020-03-07

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

Subject: what does addressable = true mean

Opportunity Odata model裡有三個entity set mark成address = true:

SAP CRM OData模型裡的addressable為true的含義

SAP help裡的解釋是mark成address = true的entity set能夠直接通過url訪問,比如如下兩個例子:document history和maxhit.

SAP CRM OData模型裡的addressable為true的含義 SAP CRM OData模型裡的addressable為true的含義

而對於其他通過$expand訪問的entity set, 比如Attachments,product等等,雖然表面上也是通過url直接訪問:

SAP CRM OData模型裡的addressable為true的含義

但是根據SAP help裡的定義,framework在訪問這些entity set時,總是先拿到root entity set,即Oppportunity,再執行expand操作。

下面的例子是Framework處理documentHistory的讀操作:框架直接call GET_ENTITYSET method直接根據傳入的guid將history返回:

SAP CRM OData模型裡的addressable為true的含義

但是對於這個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出發:

SAP CRM OData模型裡的addressable為true的含義 SAP CRM OData模型裡的addressable為true的含義

line 28先讀取Opp header,再call line 41的read function 讀取需要expand的sub entity set資訊:


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24475491/viewspace-2678929/,如需轉載,請註明出處,否則將追究法律責任。

相關文章