cap-js / change-tracking

CDS plugin providing out-of-the box support for automatic capturing, storing, and viewing of the change records of modeled entities.
https://cap.cloud.sap/docs
Apache License 2.0
22 stars 8 forks source link

Changelog entries for "create"/"delete" and numeric values of 0 are not created #111

Closed stockbal closed 2 months ago

stockbal commented 3 months ago

Hi,

currently if a numeric field is enabled to be change tracked, and a value of "0" is provided for that the field, it is available until the following point in the code, but will be skipped and not inserted into the changelog table.

https://github.com/cap-js/change-tracking/blob/e4cef968bd972064a84bd0daf58a70d34a8ef195/lib/change-log.js#L489

I expect the same thing will happen if "" is passed for a String field.

Regards, Ludwig

nkaputnik commented 2 months ago

Hello @stockbal we will analyze this together with the other issue you created

Sv7enNowitzki commented 2 months ago

Hello @stockbal

The fix has been merged into main branch, it will be available at next release. So I'll close this issue, if you have any further questions, please feel free to reopen it.

Best Regards, Wenjun