From a91e4145d742c2636a28d19226b792278524ba12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathieu=20Vanbesela=C3=ABre?= Date: Wed, 25 Sep 2024 14:23:55 -0400 Subject: [PATCH] Added constraint support for CollectionEntitySet --- src/NavigationProperty.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/NavigationProperty.php b/src/NavigationProperty.php index d107c5804..885c49ee5 100644 --- a/src/NavigationProperty.php +++ b/src/NavigationProperty.php @@ -183,7 +183,12 @@ public function generatePropertyValue( $foreignKey = $targetConstraint->getReferencedProperty()->getName(); $localKeyName = $value->getEntitySet()->getType()->getKey(); $localKey = $value->getPropertyValues()->get($localKeyName)->getValue(); - $expansionTransaction->getFilter()->setValue($foreignKey . ' eq ' . $localKey); + $constraintInjection = $foreignKey . " eq '" . $localKey . "'"; + + $filterData = $expansionTransaction->getFilter()->getValue(); + $filterData = $filterData ? "(" . $filterData . ") and " . $constraintInjection : $constraintInjection; + + $expansionTransaction->getFilter()->setValue($filterData); } }