cancel
Showing results for 
Search instead for 
Did you mean: 

CDS build error when entity field has a modifier GENERATED (GENERATED is not supported)

02-05-2020 3:16 PM
1295 views 4 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Hi everyone, my first question here.

Please, why I'm getting the error GENERATED is not supported at the cds build?

As if were the GENERATED an unkown keywork to the cds compiler.

entity MyEntity2 {
 autoId : Integer generated by default as identity ( start with 10 increment by 2 );
 name : String(100);
};

More information:

@sap/hdi-deploy, version 3.11.6 (mode default), server version 2.00.040.00.1553674765 (2.0.40.0), node version 8.15.1, HDI version 2, container API version 44.

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

pfefferf
Active Contributor

As the message says, GENERATED is not supported so far by the SAP Cloud Application Programming Model syntax. As workaround you can created a native HANA artifact (e.g. an hdbtable or an entity via an hdbcds file) and integrate it to the CAP CDS via annotation @cds.persistence.exists. For details please check https://cap.cloud.sap/docs/advanced/hana/.

0 Likes

Hi @Florian, thanks for reply.

SAP Cloud Application Programming Model is new for me. Thank you for share.

I need to confess that it's not being easy to understand some concepts. We are working at WebIDE and often we look at the CDS reference to learn how to work at WebIDE using CDS. Actually I still not figure out in which case (if there is) the use of .cds files to create entity models will replace the .hdbcds files. There is a scenery that this will happen?

pfefferf
Active Contributor
0 Likes

.cds is specific for CAP. From that files HANA artifacts are created which are then deployed by the HDI deployer. .hdbcds is already a HANA artifact which can be directly deployed by the HDI deployer.

0 Likes

Thank you again!

Answers (0)