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 ...@@ -19,15 +19,6 @@ Url: http://www.symfony-project.org
Copyright: Fabien Potencier Copyright: Fabien Potencier
License: MIT - see LICENSE file 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 Zend Framework
-------------- --------------
......
...@@ -92,6 +92,10 @@ final class Events ...@@ -92,6 +92,10 @@ final class Events
* into the current EntityManager from the database or after the refresh operation * into the current EntityManager from the database or after the refresh operation
* has been applied to it. * 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. * This is an entity lifecycle event.
* *
* @var string * @var string
......
...@@ -162,7 +162,10 @@ abstract class AbstractHydrator ...@@ -162,7 +162,10 @@ abstract class AbstractHydrator
/** /**
* Gets the row container used during row-by-row hydration through {@link iterate()}. * 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. * Processes a row of the result set.
......
...@@ -228,10 +228,4 @@ class ArrayHydrator extends AbstractHydrator ...@@ -228,10 +228,4 @@ class ArrayHydrator extends AbstractHydrator
} }
return $this->_ce[$className]; 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 ...@@ -8,4 +8,10 @@ class HydrationException extends \Doctrine\Common\DoctrineException
{ {
return new self("The result returned by the query was not unique."); 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