From d3112bf119c49876dbfaf49e84ecfef11eb3ec99 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 8c8169c90..b36ad7fb8 100644 --- a/lib/Doctrine/ORM/UnitOfWork.php +++ b/lib/Doctrine/ORM/UnitOfWork.php @@ -2314,6 +2314,10 @@ class UnitOfWork implements PropertyChangedListener return; } + if ($entity instanceof Proxy && !$entity->__isInitialized__) { + $entity->__load(); + } + $entityVersion = $class->reflFields[$class->versionField]->getValue($entity); if ($entityVersion != $lockVersion) {