diff --git a/src/ORM/Association/BelongsTo.php b/src/ORM/Association/BelongsTo.php index fdeffdfcf08..78e4abf8f8b 100644 --- a/src/ORM/Association/BelongsTo.php +++ b/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. diff --git a/tests/TestCase/ORM/QueryRegressionTest.php b/tests/TestCase/ORM/QueryRegressionTest.php index 9a6be3b3d47..5f14d20ad20 100644 --- a/tests/TestCase/ORM/QueryRegressionTest.php +++ b/tests/TestCase/ORM/QueryRegressionTest.php @@ -780,9 +780,7 @@ public function testFindMatchingWithContain() public function testHasManyEagerLoadingUniqueKey() { $table = TableRegistry::get('ArticlesTags'); - $table->belongsTo('Articles', [ - 'strategy' => 'select' - ]); + $table->belongsTo('Articles'); $result = $table->find() ->contain(['Articles' => function ($q) {