cancel
Showing results for 
Search instead for 
Did you mean: 

UPDATE become CREATE in CAP app after adding 'where' clause in CDS authentication

florine0113
Explorer
0 Kudos

Hi,

I'm working on a CAP app and adding some authorization on CDS model.

When I sent 'PATCH' request with a primary key value that doesn't exist, it is supposed to invoke the this.on('UPDATE',...) handler. At the beginning it was working fine, but once I added 'where' clause in CDS authentication, the 'PATCH' request with a primary key value that doesn't exist will became a 'CREATE' method.

My question is:

Why does the behavior change?

How can I keep the 'where' clause while 'PATCH' request with a primary key value that doesn't exist still goes into my 'UPDATE' handler?

Details:

1. where clause

2. req._ before adding where clause:

2. req._ after adding where clause:

Accepted Solutions (0)

Answers (0)