Compare commits

..

No commits in common. "2fda7e82d726ec88a2438291b151c197f135b92d" and "18313fd7f5c11eb018418764bfada2e3f94b947f" have entirely different histories.

View File

@ -109,13 +109,7 @@ class RelationBuilder
$this->entity->eventExecute(Event\EntityRelationLoadInterface::class, $name, $this->repository);
$value = call_user_func([ $this->repository, $relation->function() ]) ?? null;
if ($value === null && $this->resolver->reflectedClass->getProperties(true)[$name]->allowsNull()) {
return null;
}
return $value ?? $this->instanciateEmptyEntity($name, $relation);
return call_user_func([ $this->repository, $relation->function() ]) ?? $this->instanciateEmptyEntity($name, $relation);
case $relation->isOneToMany():
$this->oneToMany($name, $relation);