cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how to use odata draft handler without uuid in CAP JAVA?

WonseokChoe
Explorer
0 Likes
1,223

I am referring to URL:

capire - Fiori Drafts_cap.cloud.sap_2021-04-28

Please get back to me on the following feedback:

If Entity key elements are not cds.UUID or multiple composite keys, the following warning message is exposed when building the source.

`[WARNING] cm.CertainService.cds:36:12: "cm.CertainService.Master": "@odata.draft.enabled" - Entity key element should be of type "cds.UUID" (in entity:"cm.CertainService.Master")`

How can I solve the above problem without cds.UUID?

Accepted Solutions (0)

Answers (1)

Answers (1)

marcelmerkle
Product and Topic Expert
Product and Topic Expert
0 Likes

Hi Wonseok,

this is just a warning. You can still use non uuid keys as well as composite keys. Note however, that you cannot edit these keys in draft mode. They need to be specified before the draft is created and are fixed afterwards. Therefore the warning.

Best regards,
Marcel

WonseokChoe
Explorer
0 Likes

Hi Marcel,

I actually tested it. The warnings are issued in @sap/cds@4.x(@sap/cds-compiler@1.x) or lower, but not in higher versions.

For the creation of a new draft record, refer to the following:

Best regards,

Wonseok