Permalink
Browse files

More work trying to fix eager loading ans tranlate behavior

  • Loading branch information...
lorenzo committed Jan 26, 2014
1 parent a115e90 commit ec35f78d92c0836fd4a22685ad97deb975157c2b
Showing with 6 additions and 3 deletions.
  1. +6 −3 tests/TestCase/Model/Behavior/TranslateBehaviorTest.php
@@ -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();

0 comments on commit ec35f78

Please sign in to comment.