cancel
Showing results for 
Search instead for 
Did you mean: 

CAP : hana spatial data types and serialization issues

lewingan
Explorer

Hi All,

I am in the process of testing CAP with HANA spatial. I was able to define SAP HANA spatial specific data types in the CDS entity using CDS type 'hana.ST_GEOMETRY'.

Then I provided services for this entity the normal CAP way i.e. defining a service.cds. Deployment to HaaS CF is not an issue and the deployed services/OData became available for CRUD as well.

However I am having issues reading or posting geometry to the service. If I insert a geometry directly to the table via SQL and try to GET from the associated service, an error "An error occurred during serialization of the entity collection. Cannot read property 'getKind' of undefined." is returned. Similarly a POST fails if I send a JSON object to the geometry field in the below format that HANA spatial expects. In the GET if I $select fields other than the geometry field, then the OData returns the dataset (id and such) properly

Am I missing something or is it missing feature in the current iteration of CAP for interacting with HANA spatial geometry types?

Thanks

{ 
"type": "Buffer", 
"data": [ 
1, 
1, 
0, 
0, 
0, 
66, 
96, 
229, 
208, 
34, 
203, 
55, 
64, 
29, 
90, 
100, 
59, 
223, 
239, 
74, 
64  ]}

Accepted Solutions (0)

Answers (0)