Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3523

XSOdata Association

$
0
0

Hi,

I have two tables with following structures. I need to get a deep structure with association.

 

SALES

("REGION_ID" INTEGER CS_INT, "PRODUCT_ID" INTEGER CS_INT, "SALES_AMOUNT" DOUBLE CS_DOUBLE, PRIMARY KEY ("REGION_ID", "PRODUCT_ID"))

 

REGION

("REGION_ID" INTEGER CS_INT, "REGION_NAME" VARCHAR(100), "SUB_REGION_NAME" VARCHAR(100), PRIMARY KEY ("REGION_ID"))

 

I have created a xsodata service with following syntax

 

service {

"<Schma>"."REGION" as "Region" navigates ("Region_Sales" as "RegionItem");

 

"<Schma>"."SALES" as "SalesItem";

 

association "Region_Sales" with referential constraint principal "Region"("REGION_ID") multiplicity "1"

    dependent "SalesItem"("REGION_ID") multiplicity "*";

}

 

The output is as shown below. The data in detail section is empty.

 

Association.png

 

I want the output to be with all detailed data as shown below in green.

results: [

{

},

....

]

}

 

Could you please let me know how to achieve this?

 

Best Regards

Srini


Viewing all articles
Browse latest Browse all 3523

Trending Articles



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