[[{“value”:”
Enterprise applications need to maintain the integrity and traceability of data. Change tracking maintains a detailed change history by recording every insertion, update, and deletion, including the user and timestamp for each modification. This is important for root cause analyses, detecting unauthorized changes, and accountability.
In the April release notes of SAP Cloud Application Programming (CAP), we hinted at the revamped Change Tracking plugin (that was then in Beta), which greatly simplifies these tasks.
Version 2.0 of @cap-js/change-tracking is now generally available
Why 2.0? That is because the Change Tracking plugin already existed but was plagued by many issues. In Change Tracking 2.0, we have learnt from all the brickbats that have come our way and completely overhauled the plugin.
Important improvements include:
- Significant performance improvements
- Tree table visualization
- Support for CXL
Significant performance improvements
Version 2.0 of @cap-js/change-tracking introduces a fundamentally new architecture for tracking changes. Instead of capturing changes at the service level, which caused various issues like slow inserts and updates or missed updates for parent and child entities, the plugin now tracks changes at the database level using native database triggers.
Staying true to the principle of What, not How!, the plugin automatically generates native database triggers on SQLite (for local development), SAP HANA or PostgreSQL for entities while still using the original @changelog annotation.
annotate Books with @changelog: (title || ‘ (‘ || author.name || ‘)’) {
title @changelog;
price @changelog;
}
This approach delivers significant performance improvements and resolves long-standing issues with bulk operations, sorting, and change log consistency.
Tree table visualization
The new plugin version also introduces a new tree table visualization for a hierarchical view of changes across parent and child entities. The depth of displayed child changes can be configured, but is set at 3 by default.
This feature allows business users to trace modifications through the entire entity relationship tree in a single interface, rather than inspecting individual records level-by-level.
Support for CXL
The @changelog annotation has been enhanced to support CDS Expression Language (CXL). Alongside the existing path expression, this allows developers to leverage CXL’s capabilities to have more control on the customization of object IDs and label generation.
annotate Incidents {
status @changelog: (status.code || ‘: ‘ || status.descr);
price @changelog: (price < 100 ? ‘Budget’ : ‘Premium’);
}
And these are just a few! You can read about all the improvements here
We look forward to you trying this new plugin out and as always, eager to hear your feedback.
You can find the plugin here
Till then, happy coding!
“}]]
[[{“value”:”Enterprise applications need to maintain the integrity and traceability of data. Change tracking maintains a detailed change history by recording every insertion, update, and deletion, including the user and timestamp for each modification. This is important for root cause analyses, detecting unauthorized changes, and accountability.In the April release notes of SAP Cloud Application Programming (CAP), we hinted at the revamped Change Tracking plugin (that was then in Beta), which greatly simplifies these tasks. Version 2.0 of @cap-js/change-tracking is now generally availableWhy 2.0? That is because the Change Tracking plugin already existed but was plagued by many issues. In Change Tracking 2.0, we have learnt from all the brickbats that have come our way and completely overhauled the plugin.Important improvements include:Significant performance improvementsTree table visualization Support for CXLSignificant performance improvementsVersion 2.0 of @cap-js/change-tracking introduces a fundamentally new architecture for tracking changes. Instead of capturing changes at the service level, which caused various issues like slow inserts and updates or missed updates for parent and child entities, the plugin now tracks changes at the database level using native database triggers.Staying true to the principle of What, not How!, the plugin automatically generates native database triggers on SQLite (for local development), SAP HANA or PostgreSQL for entities while still using the original @changelog annotation.annotate Books with @changelog: (title || ‘ (‘ || author.name || ‘)’) {
title @changelog;
price @changelog;
} This approach delivers significant performance improvements and resolves long-standing issues with bulk operations, sorting, and change log consistency.Tree table visualizationThe new plugin version also introduces a new tree table visualization for a hierarchical view of changes across parent and child entities. The depth of displayed child changes can be configured, but is set at 3 by default. This feature allows business users to trace modifications through the entire entity relationship tree in a single interface, rather than inspecting individual records level-by-level.Support for CXLThe @changelog annotation has been enhanced to support CDS Expression Language (CXL). Alongside the existing path expression, this allows developers to leverage CXL’s capabilities to have more control on the customization of object IDs and label generation. annotate Incidents {
status @changelog: (status.code || ‘: ‘ || status.descr);
price @changelog: (price < 100 ? ‘Budget’ : ‘Premium’);
}And these are just a few! You can read about all the improvements hereWe look forward to you trying this new plugin out and as always, eager to hear your feedback. You can find the plugin here Till then, happy coding!”}]] Read More Technology Blog Posts by SAP articles
#SAPCHANNEL