on 2021 Mar 03 11:40 AM
Dear Experts,
I have an entity with a string field called "defaultValue".
entity PropertiesTest : cuid {
defaultValue : String(1000);
}
If in this field I put string "true" or "false", the value is interpreted as boolean and is converted to "1" and "0".
Data are inserted by csv file. I have tried also with quotation marks.
ID;defaultValue
bc1c3c82-6ade-11eb-9439-0242ac130002;true
773a6a34-6adf-11eb-9439-0242ac130002;false
7b96940e-6adf-11eb-9439-0242ac130002;alice test
7b96940e-6adf-11eb-9439-0242ac130005;'false'
7b96940e-6adf-11eb-9439-0242ac130006;"false"
If I try by OData, the string is correctly inserted.
HTTP/1.1 200 OK
{
"d": {
"ID": "773a6a34-6adf-11eb-9439-0242ac130002",
"defaultValue": "false",
"__metadata": {
"type": "WTest.PropertiesTest",
}
}
}
We have solved using a workaround but maybe it should be fixed.
Best.
Hi Alice,
Good news, we shipped a fix for this issue in the most recent @sap/cds release (5.9.0). The SQLite CSV importer will now interpret quoted "true" and "false" as strings instead of Booleans.
Best regards,
Steffen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
67 | |
11 | |
10 | |
10 | |
9 | |
8 | |
6 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.