diff --git a/src/TestHelper/EntityCreator.php b/src/TestHelper/EntityCreator.php index 414814669..e2d4580ad 100644 --- a/src/TestHelper/EntityCreator.php +++ b/src/TestHelper/EntityCreator.php @@ -55,7 +55,13 @@ protected function fill(IEntity $entity, array $params): void $value = $this->random($property); } - if ($property->wrapper !== null) { + if ( + $property->relationship !== null + && in_array($property->relationship->type, [ + PropertyRelationshipMetadata::ONE_HAS_MANY, + PropertyRelationshipMetadata::MANY_HAS_MANY, + ], true) + ) { $realProperty = $entity->getProperty($key); if ($realProperty instanceof IRelationshipCollection) { $realProperty->set($value);