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

Adapt to CDS 8 and optimize the logic for finding the root entity. #105

Closed Sv7enNowitzki closed 3 months ago

Sv7enNowitzki commented 3 months ago

Fix:

  1. The serviceEntity is not captured in the ChangeLog table in some cases.
  2. When modeling an inline entity, the keys attribute in the Changes table recorded the unexpected association and parent ID.
  3. When reqData is undefined, special handling is required.
  4. When running test cases in CDS 8, the request failed with a status code of 404.
  5. In CDS 8, for auto-exposed Compositions, all direct CRUD requests are rejected in non-draft cases. When executing test cases, an error with the message ENTITY_IS_AUTOEXPOSED occurs because the ChangeView falls under the aforementioned circumstances.
  6. In CDS 8, CAP does not support queries for draft-enabled entities on the application service. When running test cases, the related test cases failed and contained the error message: SqliteError: NOT NULL constraint failed: AdminService_Books_drafts.DraftAdministrativeData_DraftUUID.
  7. In CDS 8, the cds.transaction will be deprecated and needs to be replaced with req.event.
  8. req._params and req.context are not official APIs and need to be replaced with official properties to ensure code stability.

Optimize:

  1. Implement a method to analyze entities, determine their structure, add a flag to indicate whether it is a root entity, and when the entity is a child entity, record information about its parent entity.