Fixed bug with fetch=EAGER associations that have already been hydrated during querying.
This commit is contained in:
parent
cfe7ab46f2
commit
c5ef21864f
@ -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.
|
// Loading the entity right here, if its in the eager loading map get rid of it there.
|
||||||
unset($this->eagerLoadingEntities[$class->rootEntityName][$idHash]);
|
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.
|
// Properly initialize any unfetched associations, if partial objects are not allowed.
|
||||||
if ( ! isset($hints[Query::HINT_FORCE_PARTIAL_LOAD])) {
|
if ( ! isset($hints[Query::HINT_FORCE_PARTIAL_LOAD])) {
|
||||||
foreach ($class->associationMappings as $field => $assoc) {
|
foreach ($class->associationMappings as $field => $assoc) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user