diff -u b/src/Entity/EckEntity.php b/src/Entity/EckEntity.php --- b/src/Entity/EckEntity.php +++ b/src/Entity/EckEntity.php @@ -29,10 +29,7 @@ */ public function getOwner() { if ($this->hasField('uid')) { - $uid = $this->get('uid'); - if ($uid->count() > 0) { - return $uid->first()->entity; - } + return $this->get('uid')->entity; } return NULL; } @@ -41,8 +38,8 @@ * {@inheritdoc} */ public function getOwnerId() { - if ($owner = $this->getOwner()) { - return $owner->id(); + if ($this->hasField('uid')) { + return $this->get('uid')->target_id; } return NULL; }