@sap/cds-compiler
Advanced tools
Comparing version 2.11.0 to 2.11.2
@@ -297,10 +297,5 @@ 'use strict'; | ||
// up_ association | ||
if (element.$selfOnCondition && element.targetAspect) { | ||
if (element.$selfOnCondition && element.targetAspect) | ||
assignPropOnBacklinkIfPossible(SKIP_FOR_UP, true); | ||
return true; | ||
} | ||
if (element.type === 'cds.Composition') | ||
return false; | ||
return true; | ||
@@ -307,0 +302,0 @@ } |
@@ -1097,12 +1097,12 @@ 'use strict'; | ||
'on': (parent, name, on, path) => { | ||
parent.on = expand(parent.on, path); | ||
parent.on = expand(parent.on, path.concat(name)); | ||
}, | ||
'having': (parent, name, having, path) => { | ||
parent.having = expand(parent.having, path); | ||
parent.having = expand(parent.having, path.concat(name)); | ||
}, | ||
'where': (parent, name, where, path) => { | ||
parent.where = expand(parent.where, path); | ||
parent.where = expand(parent.where, path.concat(name)); | ||
}, | ||
'xpr': (parent, name, xpr, path) => { | ||
parent.xpr = expand(parent.xpr, path); | ||
parent.xpr = expand(parent.xpr, path.concat(name)); | ||
} | ||
@@ -1125,6 +1125,10 @@ }, undefined, undefined, options); | ||
const [lhs, op, rhs] = expr.slice(i); | ||
// we might have to ad-hoc resolve a ref, since handleExists is run before hand and generates new refs. | ||
const lhsArt = lhs._art || lhs.ref && !lhs.$scope && inspectRef(location.concat(i)).art; | ||
const rhsArt = rhs._art || rhs.ref && !rhs.$scope && inspectRef(location.concat(i+2)).art; | ||
// lhs & rhs must be expandable types (structures or managed associations) | ||
if(lhs._art && rhs._art && | ||
if(lhsArt && rhsArt && | ||
lhs.ref && rhs.ref && | ||
isExpandable(lhs._art) && isExpandable(rhs._art) && | ||
isExpandable(lhsArt) && isExpandable(rhsArt) && | ||
['=', '<', '>', '>=', '<=', '!=', '<>'].includes(op) && | ||
@@ -1135,4 +1139,4 @@ !(isDollarSelfOrProjectionOperand(lhs) || isDollarSelfOrProjectionOperand(rhs))) { | ||
// only do the expansion on (managed) assocs and (items.)elements, array of check in ON cond is done elsewhere | ||
const lhspaths = /*isScalarOrNoType(lhs._art) ? [ lhs ] : */ flattenPath({ _art: lhs._art, ref: lhs.ref }, false, true ); | ||
const rhspaths = /*isScalarOrNoType(rhs._art) ? [ rhs ] : */ flattenPath({ _art: rhs._art, ref: rhs.ref }, false, true ); | ||
const lhspaths = /*isScalarOrNoType(lhs._art) ? [ lhs ] : */ flattenPath({ _art: lhsArt, ref: lhs.ref }, false, true ); | ||
const rhspaths = /*isScalarOrNoType(rhs._art) ? [ rhs ] : */ flattenPath({ _art: rhsArt, ref: rhs.ref }, false, true ); | ||
@@ -1139,0 +1143,0 @@ // mapping dict for lhs/rhs for mismatch check |
{ | ||
"name": "@sap/cds-compiler", | ||
"version": "2.11.0", | ||
"version": "2.11.2", | ||
"description": "CDS (Core Data Services) compiler and backends", | ||
@@ -5,0 +5,0 @@ "homepage": "https://cap.cloud.sap/", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3733449
288129
2
3
22