SAP Knowledge Base Article - Preview

3786250 - OData API Navigation Behavior for Composite-Key Entities With and Without $expand

Symptom

When querying an OData entity that contains a navigation property to a related entity with a composite key, the response may differ depending on whether the navigation property is expanded or not.

Customers may observe that the composite-key fields of the related entity are visible when the navigation property is requested with $expand, but are no longer present when $expand is removed. This can lead to the assumption that the composite key has been collapsed, removed, or modified.

     

Example:

Request without $expand: https://api68sales.successfactors.com/odata/v2/PerPerson('666')?$format=json

  • Response:

    "emailNav":
    {
            "results": [
                {
                    "__metadata": {
                        "uri": "https://api68sales.successfactors.com/odata/v2/PerEmail(emailType='8446',personIdExternal='666')",
                        "type": "SFOData.PerEmail"
                    },
                    ...,
                {
                    "__metadata": {
                        "uri": "https://api68sales.successfactors.com/odata/v2/PerEmail(emailType='8447',personIdExternal='666')",
                        "type": "SFOData.PerEmail"
                    },

Request with $expand: https://api68sales.successfactors.com/odata/v2/PerPerson('666')?$format=json&$expand=emailNav

  • Response:

    "emailNav":
    {
            "__deferred": {
                "uri": "https://api68sales.successfactors.com/odata/v2/PerPerson('666')/emailNav"
            }
        }


Read more...

Environment

SAP SuccessFactors HCM Suite

Product

SAP SuccessFactors HCM Suite all versions

Keywords

odata v2, $expand, composite key, to-many navigation, primary row, picklist, type decoder, PerEmail, emailNav, emailTypeNav, PerPhone, PerAddress, PerNationalID, PerEmergencyContacts, employee central , KBA , LOD-SF-INT-ODATA , OData API Framework , LOD-SF-INT-EC , Employee Central SFAPI & OData Entities , How To

About this page

This is a preview of a SAP Knowledge Base Article. Click more to access the full version on SAP for Me (Login required).

Search for additional results

Visit SAP Support Portal's SAP Notes and KBA Search.