Skip to content

Commit c59a281

Browse files
authored
Quick hack fix for up_ associations (#53)
1 parent 6406fb9 commit c59a281

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cds-plugin.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ cds.on('loaded', m => {
2323
for (let e in elms) if (elms[e].key) keys.push(e)
2424

2525
// Add association to ChangeView...
26-
const on = [...changes.on]; keys.forEach((k, i) => { i && on.push('||'); on.push({ ref: [k] }) })
26+
const on = [...changes.on]; keys.forEach((k, i) => { i && on.push('||'); on.push({
27+
ref: k === 'up_' ? [k,'ID'] : [k] // REVISIT: up_ handling is a dirty hack for now
28+
})})
2729
const assoc = { ...changes, on }
2830
const query = entity.projection || entity.query?.SELECT
2931
if (query) {

0 commit comments

Comments
 (0)