Releases: cap-js/change-tracking
Releases · cap-js/change-tracking
Release list
v2.1.0
Fixed
- Prevent SQLite sidecar crash on startup in multi-tenant applications due to trigger/index deployment running before tenant tables exist
- Invoke
enhanceModelin after-deploy handler ofcds.xt.DeploymentServicebecause theloadedhandler is not invoked on the tenant CSN fromModelProviderService.getCsn() - Fix HDI deployment failure (sap.changelog.Changes_CT_INDEX.hdbindex requires db://SAP_CHANGELOG_CHANGES which is not provided by any file) caused by adding
.hdbindexartifacts even when Changes table does not exist in the compiled model - HDI deployment failure (
invalid column name: CHANGEVIEW_0.PARENT_ENTITYKEY) during extensibility upgrades sinceenhanceModelwas not called on the tenant CSN before HANA compilation - Support model enhancement with
xtendedCSN flavor to support extensibility and feature toggle setups
v2.0.3
Fixed
- Skip trigger generation for localized text tables (
*.texts)
v2.0.2
Fixed
- Fix
<expr>.cdscompilation error duringcds deploy --to hanawhen expression-based@changelogannotations (CXL) are used as objectIDs on entities with compositions - Prevent
@PersonalDatafield values from leaking intoobjectIDorvalueChangedToLabelcolumns when@changelogannotations reference such fields via path expressions or CXL - Fix missing
cds.Compositionparent entry and brokenparent_IDlinks in generated triggers when a DB-levelselect *view of a parent entity inherits the same composition
v2.0.1
Fixed
- Resolve false "Conflicting @changelog annotations" error when a service projection flattens association and inherits plain
trueinstead of a specific@changelogannotation value (e.g.,[author.name]) due to CDS annotation propagation
v2.0.0
Added
- Trigger generation for SQLite, HANA, Postgres and H2 to perform change tracking on the database level
- Allow grouping of changes via new
transactionIDcolumn valueChangedFromLabelandvalueChangedToLabelcolumns onsap.changelog.Changesfor localized labels- Allow change tracking skip via session variables for entire transactions, entities, elements (
ct.skip) - Dynamic localized label lookup: if a
@changeloglabel points to a localized property from a code list entity, the label is resolved in the reader's locale at read time - Support CDS expression language (CXL) in
@changelogannotations for custom objectIDs and changelog labels - Customizable objectID for composition changelog entries on parent entities
- Support for tracked Date, DateTime, Time and Timestamp properties with correct formatting
- Support for
@Common.Timezoneon change-tracked entities - Database indexes on
sap.changelog.Changesfor faster parent composition lookups and deduplication queries - Generation of
.hdbmigrationtableand updatingundeploy.jsonviacds add change-tracking-migration - HANA procedure
SAP_CHANGELOG_RESTORE_BACKLINKSto restore parent-child hierarchy for composition changes
Changed
- Display changes with a Tree Table
- Changes from child entities are shown on the parent ChangeView by default (configurable via
maxDisplayHierarchyDepth) - Composition changelog entries on parents always have
updateas modification type - Only skip change tracking for
@PersonalData.IsPotentiallySensitiveand@PersonalData.IsPotentiallyPersonal(not@PersonalData.FieldSemantics) - Localization is performed on database level via
sap.changelog.i18nKeystable - Modifications on
sap.changelog.Changes:- Removed
serviceEntityPath,keysand foreign keychangeLog - Renamed
entityIDtoobjectID - Added
entityKey,createdAtandcreatedByfrom deleted entitysap.changelog.ChangeLog - Added
parentassociation andchildrencomposition
- Removed
- Change History section is hidden in draft mode
Fixed
- Performance issues when working with entities that include a large number of fields and children
- Creation of changelogs at bulk operations
- Search and sort functionality on the
ChangeView LargeStringvalues are truncated and don't lead to failing inserts- Explicit type casts for Date, DateTime, Time, Timestamp and Decimal fields in
ChangeView - Format tracked decimal values with correct precision (e.g., Decimal(11,4) stores 0 as
0.0000) - ObjectID correctly falls back to entity key when all
@changelogfields are NULL
Removed
- Event handler registration for change capture mechanism
- Entity
sap.changelog.ChangeLogand flattened intosap.changelog.Changes - Removed configuration option
considerLocalizedValues - Information about which service a change originated from
v2.0.0-beta.13
Changed
- Composition changelog entries on parents have always 'update' as modification type
- HANA triggers now use statement-level execution by default for improved bulk DML performance
Added
- Consider
@Common.Timezoneon entities that are change-tracked only via a service-level@changelog. Previously,valueTimeZoneinChangeViewwas resolved only for entities annotated with@changelogat the DB level rowLevelTriggersconfiguration flag to opt into legacy row-level HANA triggers as a workaround for "invalid RID address" errors
Fixed
- Migration table now correctly handles composite keys from v1 using
HIERARCHY_COMPOSITE_ID(supports up to 5 key parts) @Capabilities.ReadRestrictionson ChangeView is now only applied when the view is auto-created by the plugin. Services that explicitly expose ChangeView allow direct read access.- HDI deployment failure caused by adding
.hdbindexartifacts even when Changes table does not exist in the compiled model
v1.2.2
Fixed
- Adjust
MERGESQL statement for migratingChangesandChangeLogtable in multitenant scenarios
v1.2.1
Fixed
- Removed
@cds.persistence.journalannotation from Changes entity that caused deployment errors
v2.0.0-beta.12
Fixed
- Build crash when using
@changelogpath annotations on unmanaged associations due to missing guard oncol.keys - SQLite update trigger
OFclause generates correct column names for unmanaged associations (e.g.,assocName_fkFieldinstead offkField) - SQLite association label lookup using the entity's primary key instead of the foreign key field in the
whereclause for unmanaged associations - Deduplication of column names in update trigger
OFclauses when a field is referenced by both a tracked element and an unmanaged association - Prevent server crash when no db connection is available during session variable assignment
Added
- Optimization to skip unnecessary subselect lookups for unmanaged associations when the
@changelogpath references a target key that is already available as a local foreign key field
v2.0.0-beta.11
Added
- Database indexes for
sap.changelog.Changestable onparent_IDfor navigating the parent association hierarchy (SQLite, HANA, Postgres)
Fixed
- ChangeView in services is no longer directly accessible. Now it can only be accessed via the navigation paths
- Deployment error when an entity key uses a custom type defined as an association (e.g.,
type MyType : Association to SomeEntity) due to incorrect entityKey expression in the changes association mapping - Runtime error when requesting
ChangeViewdue to incorrectwhereclause for entities with association-typed keys in timezone column subselects