Skip to content

Commit

Permalink
Merge pull request #1070 from Engerim/bugfix_blameable
Browse files Browse the repository at this point in the history
Fixed failing test for blameable
  • Loading branch information
stof committed May 9, 2014
2 parents 6120bd0 + ecf70f0 commit 352a5a8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/Gedmo/Blameable/BlameableListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ protected function updateField($object, $ea, $meta, $field)
$oldValue = $property->getValue($object);
$newValue = $this->getUserValue($meta, $field);

//if blame is reference, persist object
if ($meta->hasAssociation($field)) {
$ea->getObjectManager()->persist($newValue);
}
$property->setValue($object, $newValue);
if ($object instanceof NotifyPropertyChanged) {
$uow = $ea->getObjectManager()->getUnitOfWork();
Expand Down

2 comments on commit 352a5a8

@smatyas
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This introduced the bug #1074 for me as well.

@Padam87
Copy link
Collaborator

@Padam87 Padam87 commented on 352a5a8 Jun 2, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.