Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
Update SingularRelation.php
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy-j committed Nov 16, 2018
1 parent 103927a commit bebc77c
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions source/Spiral/ORM/Entities/Relations/SingularRelation.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,7 @@ abstract class SingularRelation extends AbstractRelation
*/
public function hasRelated(): bool
{
if (!$this->isLoaded()) {
//Lazy loading our relation data
$this->loadData();
}

return !empty($this->instance);
return !empty($this->getRelated());
}

/**
Expand Down Expand Up @@ -131,4 +126,4 @@ protected function isPlaceholderNeeded(): bool
{
return static::CREATE_PLACEHOLDER;
}
}
}

0 comments on commit bebc77c

Please sign in to comment.