diff --git a/src/SimpleThings/EntityAudit/AuditReader.php b/src/SimpleThings/EntityAudit/AuditReader.php index 6a53378c..88b5ee9a 100644 --- a/src/SimpleThings/EntityAudit/AuditReader.php +++ b/src/SimpleThings/EntityAudit/AuditReader.php @@ -443,6 +443,9 @@ private function createEntity($className, array $columnMap, array $data, $revisi $value = $this->find($targetClass->name, $pk, $revision, array('threatDeletionsAsExceptions' => true)); } catch (DeletedException $e) { $value = null; + } catch (NoRevisionFoundException $e) { + // The entity does not have any revision yet. So let's get the actual state of it. + $value = $this->em->find($targetClass->name, $pk); } $class->reflFields[$field]->setValue($entity, $value);