From cadf50a9c410a6361d5d8a17a9a84be83176731e Mon Sep 17 00:00:00 2001 From: Gintaras Date: Wed, 20 Sep 2017 12:27:13 +0300 Subject: [PATCH] Updated ORM.php optimization Cast integer to string same as https://github.com/Atlantic18/DoctrineExtensions/commit/f8d2be8f9cff7ce1fc51b2add01fa8dfc5aef3b4 --- lib/Gedmo/Loggable/Mapping/Event/Adapter/ORM.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Gedmo/Loggable/Mapping/Event/Adapter/ORM.php b/lib/Gedmo/Loggable/Mapping/Event/Adapter/ORM.php index ec87f8d6f4..7d768da254 100644 --- a/lib/Gedmo/Loggable/Mapping/Event/Adapter/ORM.php +++ b/lib/Gedmo/Loggable/Mapping/Event/Adapter/ORM.php @@ -38,7 +38,7 @@ public function getNewVersion($meta, $object) $em = $this->getObjectManager(); $objectMeta = $em->getClassMetadata(get_class($object)); $identifierField = $this->getSingleIdentifierFieldName($objectMeta); - $objectId = $objectMeta->getReflectionProperty($identifierField)->getValue($object); + $objectId = (string) $objectMeta->getReflectionProperty($identifierField)->getValue($object); $dql = "SELECT MAX(log.version) FROM {$meta->name} log"; $dql .= " WHERE log.objectId = :objectId";