Skip to content

Commit 352a5a8

Browse files
committed
Merge pull request #1070 from Engerim/bugfix_blameable
Fixed failing test for blameable
2 parents 6120bd0 + ecf70f0 commit 352a5a8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/Gedmo/Blameable/BlameableListener.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ protected function updateField($object, $ea, $meta, $field)
8181
$oldValue = $property->getValue($object);
8282
$newValue = $this->getUserValue($meta, $field);
8383

84+
//if blame is reference, persist object
85+
if ($meta->hasAssociation($field)) {
86+
$ea->getObjectManager()->persist($newValue);
87+
}
8488
$property->setValue($object, $newValue);
8589
if ($object instanceof NotifyPropertyChanged) {
8690
$uow = $ea->getObjectManager()->getUnitOfWork();

0 commit comments

Comments
 (0)