This commit is contained in:
Dave Mc Nicoll 2023-01-14 02:25:10 +00:00
commit 26febb631d
1 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ class RelationBuilder
}
}
public function searchRelation(string $name) /* : object|EntityCollection|bool */
public function searchRelation(string $name) : object|bool
{
# Resolve relations here if one is called
if ( $this->entity->isLoaded() ) {
@ -45,7 +45,7 @@ class RelationBuilder
return $dataset;
}
return $this->resolveRelation($name) ?: $this->resolveVirtual($name);
return $this->resolveRelation($name) ?: $this->resolveVirtual($name) ?: false;
}
else {
if ( $relation = $this->resolver->searchFieldAnnotation($name, new Relation() ) ) {