on 05-15-2023 1:48 AM
Hi Experts,
I found that CAP's built in type Decimal(precision, scale) does not validate `Scale`/`Precision` properly.
When inserting to an entity having decimal like:
entity Book : cuid {
price : Decimal(5, 2);
}<br>
with value
Any advice gladly accepted.
Regards,
Jerin Jacob
Hi Jerin,
Thanks for reporting. I can reproduce and we will have a look.
One remark: SQLite is famously lax in such regards. On HANA, 13.042, for example, would become 13.04 (i.e., the additional digits are pruned) and 1300.4 results in an error.
Best,
Sebastian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sebastian,
Thanks for confirming that.
I found this issue in a BTP Prod subaccount where CAP server is connected to SAP Hana Cloud. When attempting to push the value `1300.00`, it responded back with
`"message": "numeric overflow: Failed in \"PRICE\" column with the value 1300.00"`
which originated from Hana Cloud. I believe CAP can and should validate this input before sending it to Hana.
Thanks for letting me know of SQLite's limitations.
Regards,
Jerin Jacob
Hi Jerin,
We do not have external tracking, I'm afraid. But the feature will be part of the next release.
Best,
Sebastian
User | Count |
---|---|
74 | |
8 | |
8 | |
7 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.