1
0
mirror of synced 2025-01-30 03:51:43 +03:00

Fixed bug with fetch=EAGER associations that have already been hydrated during querying.

This commit is contained in:
Guilherme Blanco 2011-10-26 15:04:49 -02:00
parent cfe7ab46f2
commit c5ef21864f

View File

@ -2054,6 +2054,11 @@ class UnitOfWork implements PropertyChangedListener
// Loading the entity right here, if its in the eager loading map get rid of it there.
unset($this->eagerLoadingEntities[$class->rootEntityName][$idHash]);
if (isset($this->eagerLoadingEntities[$class->rootEntityName]) &&
! $this->eagerLoadingEntities[$class->rootEntityName]) {
unset($this->eagerLoadingEntities[$class->rootEntityName]);
}
// Properly initialize any unfetched associations, if partial objects are not allowed.
if ( ! isset($hints[Query::HINT_FORCE_PARTIAL_LOAD])) {
foreach ($class->associationMappings as $field => $assoc) {