Skip to content

Commit

Permalink
fix: exclude cds.LargeBinary from wildcard expansion (#577)
Browse files Browse the repository at this point in the history
before this change, only the `MediaType` annotation was checked, but we
should rather check the elements type as pointed out in [this
comment](#570 (review))
  • Loading branch information
patricebender authored Apr 11, 2024
1 parent a90a75f commit 6661d63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db-service/lib/cqn4sql.js
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ function cqn4sql(originalQuery, model) {
const { index, tableAlias } = inferred.$combinedElements[k][0]
const element = tableAlias.elements[k]
// ignore FK for odata csn / ignore blobs from wildcard expansion
if (isManagedAssocInFlatMode(element) || (element['@Core.MediaType'] && !element['@Core.IsURL'])) return
if (isManagedAssocInFlatMode(element) || element.type === 'cds.LargeBinary') return
// for wildcard on subquery in from, just reference the elements
if (tableAlias.SELECT && !element.elements && !element.target) {
wildcardColumns.push(index ? { ref: [index, k] } : { ref: [k] })
Expand Down

0 comments on commit 6661d63

Please sign in to comment.