diff --git a/lib/Doctrine/ORM/EntityNotFoundException.php b/lib/Doctrine/ORM/EntityNotFoundException.php new file mode 100644 index 000000000..ae478be4d --- /dev/null +++ b/lib/Doctrine/ORM/EntityNotFoundException.php @@ -0,0 +1,17 @@ + { private function _load() { if (!$this->__isInitialized__ && $this->_entityPersister) { $this->__isInitialized__ = true; - $this->_entityPersister->load($this->_identifier, $this); + if ($this->_entityPersister->load($this->_identifier, $this) === null) { + throw new \Doctrine\ORM\EntityNotFoundException(); + } unset($this->_entityPersister); unset($this->_identifier); }