Quantcast
Channel: SCN : All Content - SAP Gateway
Viewing all articles
Browse latest Browse all 2823

One-to-One relationship between two objects of the same Entity type

$
0
0

I am facing some troubles with NW Gateway about a deep insert for one one-to-one relationship:

 

This is my JSON:

{

  FirstName : "Juan",

  LastName : "Duran"

  Spouse : {

    FirstName : "Maria",

    LastName : "Duque"

  }

}

 

And I want those two objects to be inserted in a "ZPEOPLE" table. How should I define and do that? (NW Gateway).

I must use the ODataModel.create("/People",...,...,...,...) method.

A 'Person' entity type should be defined as PersonId(PK), FirstName, LastName, SpouseId (The one-to-one relationship between two 'Person' entities).

 

Thank you in advance.


Viewing all articles
Browse latest Browse all 2823

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>