@cap-js/audit-logging 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/utils.js +5 -1
  2. package/package.json +1 -1
package/lib/utils.js CHANGED
@@ -108,7 +108,11 @@ const _keyColumns = (keys, alias) => {
108
108
  .map(key => ({ ref: [alias, key.name] }))
109
109
  }
110
110
 
111
- const _alias = entity => entity.name.replace(`${entity._service.name}.`, '').replace('.', '_')
111
+ const _alias = entity => {
112
+ // REVISIT: we should not rely on entity._service (but I don't want to break existing behavior right now)
113
+ if (!entity._service) return `${entity}`
114
+ return entity.name.replace(`${entity._service.name}.`, '').replace(/\./g, '_')
115
+ }
112
116
 
113
117
  const _buildSubSelect = (model, { entity, relative, element, next }, row, previousCqn) => {
114
118
  // relative is a parent or an entity itself
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cap-js/audit-logging",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "CDS plugin providing integration to the SAP Audit Log service as well as out-of-the-box personal data-related audit logging based on annotations.",
5
5
  "repository": "cap-js/audit-logging",
6
6
  "author": "SAP SE (https://www.sap.com)",