Skip to content

Commit

Permalink
Added constraint support for CollectionEntitySet
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Vanbeselaëre committed Sep 25, 2024
1 parent 4e550d2 commit a91e414
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/NavigationProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit a91e414

Please sign in to comment.