From 00b6f622873269581f0bdee5a44d1fc549626220 Mon Sep 17 00:00:00 2001 From: Carnage Date: Sat, 10 Jan 2015 13:59:42 +0000 Subject: [PATCH] Fixed issue --- lib/Doctrine/ORM/UnitOfWork.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Doctrine/ORM/UnitOfWork.php b/lib/Doctrine/ORM/UnitOfWork.php index 758754202..8789b5f81 100644 --- a/lib/Doctrine/ORM/UnitOfWork.php +++ b/lib/Doctrine/ORM/UnitOfWork.php @@ -2353,6 +2353,10 @@ class UnitOfWork implements PropertyChangedListener return; } + if ($entity instanceof Proxy && !$entity->__isInitialized__) { + $entity->__load(); + } + $entityVersion = $class->reflFields[$class->versionField]->getValue($entity); if ($entityVersion != $lockVersion) {