Skip to content

Releases: cap-js/change-tracking

v2.1.0

Choose a tag to compare

@github-actions github-actions released this 28 Jul 14:26
a959d68

Fixed

  • Prevent SQLite sidecar crash on startup in multi-tenant applications due to trigger/index deployment running before tenant tables exist
  • Invoke enhanceModel in after-deploy handler of cds.xt.DeploymentService because the loaded handler is not invoked on the tenant CSN from ModelProviderService.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 .hdbindex artifacts even when Changes table does not exist in the compiled model
  • HDI deployment failure (invalid column name: CHANGEVIEW_0.PARENT_ENTITYKEY) during extensibility upgrades since enhanceModel was not called on the tenant CSN before HANA compilation
  • Support model enhancement with xtended CSN flavor to support extensibility and feature toggle setups

v2.0.3

Choose a tag to compare

@github-actions github-actions released this 21 Jul 12:13
b67286a

Fixed

  • Skip trigger generation for localized text tables (*.texts)

v2.0.2

Choose a tag to compare

@github-actions github-actions released this 13 Jul 13:11
f5b1e25

Fixed

  • Fix <expr>.cds compilation error during cds deploy --to hana when expression-based @changelog annotations (CXL) are used as objectIDs on entities with compositions
  • Prevent @PersonalData field values from leaking into objectID or valueChangedToLabel columns when @changelog annotations reference such fields via path expressions or CXL
  • Fix missing cds.Composition parent entry and broken parent_ID links in generated triggers when a DB-level select * view of a parent entity inherits the same composition

v2.0.1

Choose a tag to compare

@github-actions github-actions released this 19 Jun 11:46
a28771d

Fixed

  • Resolve false "Conflicting @changelog annotations" error when a service projection flattens association and inherits plain true instead of a specific @changelog annotation value (e.g., [author.name]) due to CDS annotation propagation

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 12 Jun 09:42
0588421

Added

  • Trigger generation for SQLite, HANA, Postgres and H2 to perform change tracking on the database level
  • Allow grouping of changes via new transactionID column
  • valueChangedFromLabel and valueChangedToLabel columns on sap.changelog.Changes for localized labels
  • Allow change tracking skip via session variables for entire transactions, entities, elements (ct.skip)
  • Dynamic localized label lookup: if a @changelog label 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 @changelog annotations 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.Timezone on change-tracked entities
  • Database indexes on sap.changelog.Changes for faster parent composition lookups and deduplication queries
  • Generation of .hdbmigrationtable and updating undeploy.json via cds add change-tracking-migration
  • HANA procedure SAP_CHANGELOG_RESTORE_BACKLINKS to 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 update as modification type
  • Only skip change tracking for @PersonalData.IsPotentiallySensitive and @PersonalData.IsPotentiallyPersonal (not @PersonalData.FieldSemantics)
  • Localization is performed on database level via sap.changelog.i18nKeys table
  • Modifications on sap.changelog.Changes:
    • Removed serviceEntityPath, keys and foreign key changeLog
    • Renamed entityID to objectID
    • Added entityKey, createdAt and createdBy from deleted entity sap.changelog.ChangeLog
    • Added parent association and children composition
  • 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
  • LargeString values 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 @changelog fields are NULL

Removed

  • Event handler registration for change capture mechanism
  • Entity sap.changelog.ChangeLog and flattened into sap.changelog.Changes
  • Removed configuration option considerLocalizedValues
  • Information about which service a change originated from

v2.0.0-beta.13

Choose a tag to compare

@github-actions github-actions released this 10 Jun 06:28
9807a94

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.Timezone on entities that are change-tracked only via a service-level @changelog. Previously, valueTimeZone in ChangeView was resolved only for entities annotated with @changelog at the DB level
  • rowLevelTriggers configuration 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.ReadRestrictions on 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 .hdbindex artifacts even when Changes table does not exist in the compiled model

v1.2.2

Choose a tag to compare

@github-actions github-actions released this 02 Jun 14:25
5b7697c

Fixed

  • Adjust MERGE SQL statement for migrating Changes and ChangeLog table in multitenant scenarios

v1.2.1

Choose a tag to compare

@github-actions github-actions released this 02 Jun 12:52

Fixed

  • Removed @cds.persistence.journal annotation from Changes entity that caused deployment errors

v2.0.0-beta.12

Choose a tag to compare

@github-actions github-actions released this 18 May 14:25
3d16d7b

Fixed

  • Build crash when using @changelog path annotations on unmanaged associations due to missing guard on col.keys
  • SQLite update trigger OF clause generates correct column names for unmanaged associations (e.g., assocName_fkField instead of fkField)
  • SQLite association label lookup using the entity's primary key instead of the foreign key field in the where clause for unmanaged associations
  • Deduplication of column names in update trigger OF clauses 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 @changelog path references a target key that is already available as a local foreign key field

v2.0.0-beta.11

Choose a tag to compare

@github-actions github-actions released this 28 Apr 16:58
2b05bc5

Added

  • Database indexes for sap.changelog.Changes table on parent_ID for 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 ChangeView due to incorrect where clause for entities with association-typed keys in timezone column subselects