Skip to content

Commit

Permalink
Updated ORM.php optimization
Browse files Browse the repository at this point in the history
Cast integer to string same as f8d2be8
  • Loading branch information
gintarasba authored Sep 20, 2017
1 parent 857654d commit cadf50a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Gedmo/Loggable/Mapping/Event/Adapter/ORM.php
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit cadf50a

Please sign in to comment.