Skip to content

Commit

Permalink
Merge pull request #15 from SerafimArts/master
Browse files Browse the repository at this point in the history
Fix null pointer exception
  • Loading branch information
wolfy-j authored May 3, 2019
2 parents 65789c1 + 4f7cfdc commit 41ed269
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ORM.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ public function resolveRole($entity): string
$entity = $class;
}

if (is_null($this->schema)) {
throw new ORMException('ORM Schema should be defined');
}

return $this->schema->resolveAlias($entity);
}

Expand Down

0 comments on commit 41ed269

Please sign in to comment.