Commit 59fff29c authored by romanb's avatar romanb

[2.0] Some hydration simplifications and cleanups.

parent 4f644901
......@@ -19,15 +19,6 @@ Url: http://www.symfony-project.org
Copyright: Fabien Potencier
License: MIT - see LICENSE file
Spyc
----
Doctrine contains a port of the Spyc software
Url: http://spyc.sourceforge.net/
Copyright: 2005-2006 Chris Wanstrath
License: MIT - http://www.opensource.org/licenses/mit-license.php
Zend Framework
--------------
......
......@@ -66,9 +66,9 @@ class DoctrineException extends \Exception
if ($method && $class) {
return new self("The method '$method' is not implemented in class '$class'.");
} else if ($method && ! $class) {
return new self($method);
return new self($method);
} else {
return new self('Functionality is not implemented.');
return new self('Functionality is not implemented.');
}
}
......
......@@ -92,6 +92,10 @@ final class Events
* into the current EntityManager from the database or after the refresh operation
* has been applied to it.
*
* Note that the postLoad event occurs for an entity before any associations have been
* initialized. Therefore it is not safe to access associations in a postLoad callback
* or event handler.
*
* This is an entity lifecycle event.
*
* @var string
......
......@@ -162,7 +162,10 @@ abstract class AbstractHydrator
/**
* Gets the row container used during row-by-row hydration through {@link iterate()}.
*/
abstract protected function _getRowContainer();
protected function _getRowContainer()
{
return array();
}
/**
* Processes a row of the result set.
......
......@@ -228,10 +228,4 @@ class ArrayHydrator extends AbstractHydrator
}
return $this->_ce[$className];
}
/** {@inheritdoc} */
protected function _getRowContainer()
{
return array();
}
}
\ No newline at end of file
......@@ -8,4 +8,10 @@ class HydrationException extends \Doctrine\Common\DoctrineException
{
return new self("The result returned by the query was not unique.");
}
public static function parentObjectOfRelationNotFound($alias, $parentAlias)
{
return new self("The parent object of entity result with alias '$alias' was not found."
. " The parent alias is '$parentAlias'.");
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment