[progress Communities] [progress Openedge Abl] Forum Post: Jsdo And A Nested Hierarchical...

  • Thread starter Thread starter Marko Myllymäki
  • Start date Start date
Status
Not open for further replies.
M

Marko Myllymäki

Guest
Hi, we are using Kendo and JSDO in our front-end and OE 11.6 Data Object service in the back-end. We would like to consume a service that returns hierarchical data as nested json. I found this example of hiearchical usage: http://oemobiledemo.progress.com/jsdo/example023.html In that case, the returned dataset is like this: { "dsCustOrder": { "eCustomer": [ { "CustNum": 1, "Name": "Urpon frisbee", "Address": "276 North Drive" }, {...} ], "eOrder": [ { "OrderNum": 1, "CustNum": 1, "OrderDate": "1998-01-26" },{...} ] }} So, the temp-tables eCustomer and eOrder are on the same level. The hierarchy between eCustomer and eOrder is defined in the service.json. This works nicely. However, in our case we would like to use a nested format. When we add the NESTED keyword in the dataset's relation definition in the business entity, the dataset is returned like this: { "dsCustOrder": { "eCustomer": [ { "CustNum": 1, "Name": "Urpon frisbee", "Address": "276 North Drive", "eOrder": [ { "OrderNum": 1, "CustNum": 1, "OrderDate": "1998-01-26" },{...} ] }, {...} ] }} so every eOrder is nested inside its parenting eCustomer. Is there a way to consume this kind of response using JSDO? It seems that when using a nested structure, only the top level temp-tables (eCustomer in this case) can be found in the response object so we have no access to eOrder data.

Continue reading...
 
Status
Not open for further replies.
Back
Top