diff --git a/src/DataSource/DoctrineCollectionDataSource.php b/src/DataSource/DoctrineCollectionDataSource.php index 0311644f..afb33d87 100755 --- a/src/DataSource/DoctrineCollectionDataSource.php +++ b/src/DataSource/DoctrineCollectionDataSource.php @@ -78,6 +78,10 @@ public function getData(): array public function filterOne(array $condition): IDataSource { foreach ($condition as $column => $value) { + if ($column === $this->primaryKey && is_numeric($value)) { + $value = (int) $value; + } + $expr = Criteria::expr()->eq($column, $value); $this->criteria->andWhere($expr); }