cancel
Showing results for 
Search instead for 
Did you mean: 

What is the best way to store & fetch json object in HANA schema using CAP?

elinaim
Employee
Employee
0 Kudos

What would be the best way to handle JSON object into HANA Schema,

and fetching it by query using CAP Nodejs

Example:

I have items entity, for each item i have owners that i store as a json Object.

{ [owner1,owner2,owner3]}

Owners can be linked to multiple items, and items could be linked to multiple owners

So I Need to do a query to fetch all items under a specific owner,

items Entity:

items:{
  key ID : UUID; 
subItems: Integer;
description: String;
owners: String;
}
Andrew_Mai
Participant
0 Kudos

Using SAP HANA Cloud JSON Document Store is a way. But we will have to call it with custom handler, using sap-hdbext-promisfied to trigger the call manually.

https://developers.sap.com/tutorials/hana-cloud-cap-stored-proc.html

I used this one as a reference. The above is about how to use procedure, but same way to access JSON Document Store.

Accepted Solutions (0)

Answers (0)