Skip to content

Special Character '/' in key causes crash #187

@KikiSuperhero

Description

@KikiSuperhero

Dear experts,

we have a CDS entity with a string valued primary key

entity Samples : CodeList {
  key ID : String
  name : String
}

Because of business requirements the primary key may include a '/'. Annotating any field of the Samples entity with the @changelog annotation causes an 'cannot read property of undefined' error when editing & saving this field in draft mode. Specifically, in the _formatObjectID method of the change-log.js the path variable is incorrectly split at the wrong '/'.

const _formatObjectID = async function (changes, reqData) {
  const objectIdCache = new Map()
  for (const change of changes) {
    const path = change.serviceEntityPath.split('/')
    const curNodePathVal = path.pop()
    const parentNodePathVal = path.pop()
    ...

Kind regards

Christoph

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions