Open dvvelzen opened 4 years ago
hi, i'm guessing that you would expect the POST to either not work at all (incl persistence) or work with a warning (given that you set a default value for VAL). right?
but -without any pun intended- i don't fully get
VAL: Integer default 12 not null
b/c i'd rather expect
VAL: Integer not null
or
VAL: Integer default 12
why both default
and not null
?
Hi,
I would expect the Insertable (POST) to work by sending "ID" only and getting a return of "ID" and "VAL". "VAL" having the value of the default as it is not supplied.
If I do the above INSERT. With Updatable: true => this works ok. If I do the above INSERT. With Updatable: false => this enters a records in DB, but throws an error on the service.
HTH, Dennis
Seems to be picked up based on the initial question on the community page;
Hi,
I've created a new cds project with cds init and created a db/ and srv/ service.
The db service is using a not null field with a default. The service is a projection with with Capabilities annotation;
db/
srv/
When doing a POST to create a new entry with only the ID field supplied I get the following error:
The insert did work though as it is in the database. Secondly if I set Updatable to true the service works normally and returns the created entity without an error.
/D