Browse Source

Fixing BelongsTo strategies / test

Patrick Conroy 11 years ago
parent
commit
da955896ef
2 changed files with 2 additions and 4 deletions
  1. 1 1
      src/ORM/Association/BelongsTo.php
  2. 1 3
      tests/TestCase/ORM/QueryRegressionTest.php

+ 1 - 1
src/ORM/Association/BelongsTo.php

@@ -37,7 +37,7 @@ class BelongsTo extends Association
      *
      * @var array
      */
-    protected $_validStrategies = [parent::STRATEGY_JOIN, parent::STRATEGY_SELECT];
+    protected $_validStrategies = [parent::STRATEGY_JOIN];
 
     /**
      * Sets the name of the field representing the foreign key to the target table.

+ 1 - 3
tests/TestCase/ORM/QueryRegressionTest.php

@@ -780,9 +780,7 @@ class QueryRegressionTest extends TestCase
     public function testHasManyEagerLoadingUniqueKey()
     {
         $table = TableRegistry::get('ArticlesTags');
-        $table->belongsTo('Articles', [
-            'strategy' => 'select'
-        ]);
+        $table->belongsTo('Articles');
 
         $result = $table->find()
             ->contain(['Articles' => function ($q) {