Skip to content

Commit 0653af7

Browse files
authored
fix: properly identify entityset for parametrized queries (#913)
1 parent ac638cb commit 0653af7

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@sap-ux/fe-mockserver-core': patch
3+
---
4+
5+
We now properly identify the entityset in case of parametrized query in v2

packages/fe-mockserver-core/src/data/dataAccess.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,12 @@ export class DataAccess implements DataAccessInterface {
674674
// Fake containment for result set
675675
targetContainedEntityType = navPropDetail.targetType;
676676
targetContainedData = innerData[queryPathPart.path];
677-
currentEntitySet = undefined;
677+
if (this.metadata.getVersion() === '2.0') {
678+
// In V2 there might be a target entityset as containment doesn't exist
679+
currentEntitySet = currentEntitySet?.navigationPropertyBinding[navPropDetail.name];
680+
} else {
681+
currentEntitySet = undefined;
682+
}
678683
currentEntityType = targetContainedEntityType;
679684
if (hasOnlyDraftKeyOrNoKeys) {
680685
currentKeys = {};

0 commit comments

Comments
 (0)