You will now create an OData file to expose the contents of the artifacts you defined in your CDS module. This is not really Node.js development but the utilization of the runtime environment to expose OData. You can see real examples of Node.js development in the SHINE model later.
Create a file called xsodata/PO.xsodata
under js->lib
Open the file called PO.xsodata
and add the following content:
service {
"PO.PO_VIEW" as "POHeader"
keys ("PURCHASEORDERID")
navigates ("Items" as "POItem");
"PO.ITEM" as "POItem";
association "Items" principal "POHeader"("PURCHASEORDERID")
multiplicity "1" dependent "POItem"("PURCHASEORDERID") multiplicity "*";
}
Note: You can disregard the warning in the OData definition
Save and Build the js
module.