Browse Source

More work trying to fix eager loading ans tranlate behavior

Jose Lorenzo Rodriguez 12 years ago
parent
commit
ec35f78d92
1 changed files with 6 additions and 3 deletions
  1. 6 3
      tests/TestCase/Model/Behavior/TranslateBehaviorTest.php

+ 6 - 3
tests/TestCase/Model/Behavior/TranslateBehaviorTest.php

@@ -315,9 +315,12 @@ class TranslateBehaviorTest extends TestCase {
 		$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();