Skip to content

Commit

Permalink
More work trying to fix eager loading ans tranlate behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Jan 26, 2014
1 parent a115e90 commit ec35f78
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/TestCase/Model/Behavior/TranslateBehaviorTest.php
Expand Up @@ -315,9 +315,12 @@ public function testTranslationsHasMany() {
$comments = $table->hasMany('Comments')->target();
$comments->addBehavior('Translate', ['fields' => ['comment']]);

$results = $table->find('translations')->contain(['Comments' => function($q) {
return $q->find('translations')->select(['id', 'comment', 'article_id']);
}]);
$results = $table->find('translations')->contain([
'Comments' => function($q) {
debug(\Cake\Utility\Debugger::trace());
return $q->find('translations')->select(['id', 'comment', 'article_id']);
}
]);


$article = $results->first();
Expand Down

0 comments on commit ec35f78

Please sign in to comment.