cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Dear Experts,

I call an entity in order to edit some data, so I do a PUT request.

Entity key doesn't exist, so result expected is "Error: record doesn't exist" but the behavior is diffent.

EDIT request is converted in CREATE request and new record is insterted.

In CAP's change log documentation, I find this comment:

Is it possible to disable this behavior?

Maybe by configuration?

Best

Alice

View Entire Topic
vansyckel
Product and Topic Expert
Product and Topic Expert

Hi Alice,

Yes, you can by adding the following to your cds config.

Best,
Sebastian

runtime: {
  allow_upsert: false
}
alicegavanelli
Participant

Hi Sebastian,

this configuration works.

I have change file .cdsrc.json adding this property:

    "runtime": {
        "allow_upsert": false
    },

Best

Alice