Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use new $table->entityClass() instead of $table->newEntity()
  • Loading branch information
robertpustulka committed Jul 2, 2015
1 parent 314cb7d commit fc66850
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ORM/Behavior/TranslateBehavior.php
Expand Up @@ -444,11 +444,11 @@ public function groupTranslations($results)

$result = [];
foreach ($grouped->combine('field', 'content', 'locale') as $locale => $keys) {
$translation = $this->_table->newEntity($keys + ['locale' => $locale], [
$entityClass = $this->_table->entityClass();
$translation = new $entityClass($keys + ['locale' => $locale], [
'markNew' => false,
'useSetters' => false,
'markClean' => true,
'validate' => false
'markClean' => true
]);
$result[$locale] = $translation;
}
Expand Down

0 comments on commit fc66850

Please sign in to comment.