Skip to Content

CAP entity modelling and HANA IDENTITY columns

I am looking at converting our existing HANA entities defined with hdbcds files into the CAP model.

CAP provides the common UUID type but I am having the requirement to define a key field using the HANA IDENTITY type.

So eg the following field:

key ID: Integer64 generated always as identity(start with 1 increment by 1);

I don't seem to be able to find the same functionality within CDS.

How can we achieve the above ?

Basically I want to be sure I have an incremental value whenever a new entry is created. I could redefine the on create event and perform a select I guess but what with concurrency, etc ..

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    Posted on May 25 at 08:11 AM

    Hi Steven De Saeger,

    CAP does not support sequences.

    However, you might be able to achieve your scenario with our support for native HANA artifacts ( Further, before overwriting the on handler, I'd try via before handler.


    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.