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.
I want the output to be with all detailed data as shown below in green.
results: [
{
__metadata: {
- type: "yyy.xxxx.myxsodata1.hanatut.RegionType",
- uri: "https://server:port/yyy/xxxxx/myxsodata1/hanatut.xsodata/Region(100)"
- },
- REGION_ID: 100
- REGION_NAME: "Americas",
- SUB_REGION_NAME: "North-America",
- RegionItem: [{
__deferred: {
},
REGION_ID: 100,
PRODUCT_ID: 2,
SALES_AMOUNT: "90"
}....]
},
....
]
}
Could you please let me know how to achieve this?
Best Regards
Srini