How can we create an xsodata service which only allows to read data but prevents any insert/update/delete operation? : hana xsjs
Answer Posted / Balwinder Singh
To create an XSODATA service that only allows reading data without supporting insert, update, or delete operations in SAP HANA, you can configure the service to have a read-only CDS view. Here is an example:
@AbapCatalog.sqlViewName: 'Z_MY_CDS_VIEW'
@EndUserText.label : 'My CDs View'
definition entity MyEntity {
key myKey: int4,
description: string;
@Search.key
@AbapCatalog.sqlType: 'INT4'
@EndUserText.label : 'Key'
myKey,
@AbapCatalog.sqlType: 'NVARCHAR2'
@EndUserText.label : 'Description'
description;
}
@EndUserText.label : 'My XSODATA Service'
definition service MyService {
entity MyEntity as myEntity;
}
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
No New Questions to Answer in this Category !! You can
Post New Questions
Answer Questions in Different Category