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";