Skip to content

Commit

Permalink
Merge pull request #274 from jonasgoderis/cascade-translation
Browse files Browse the repository at this point in the history
Translatable: enable cascade persist and merge on the owning side
  • Loading branch information
docteurklein committed Dec 18, 2015
2 parents cef6845 + 8f536e1 commit 5bad0a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ORM/Translatable/TranslatableSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ private function mapTranslation(ClassMetadata $classMetadata)
$classMetadata->mapManyToOne([
'fieldName' => 'translatable',
'inversedBy' => 'translations',
'fetch' => $this->translationFetchMode,
'cascade' => ['persist', 'merge'],
'fetch' => $this->translationFetchMode,
'joinColumns' => [[
'name' => 'translatable_id',
'referencedColumnName' => 'id',
Expand Down

0 comments on commit 5bad0a2

Please sign in to comment.