Skip to content

Commit

Permalink
Fixing BelongsTo strategies / test
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Conroy committed Mar 6, 2015
1 parent c71df6a commit da95589
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ORM/Association/BelongsTo.php
Expand Up @@ -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.
Expand Down
4 changes: 1 addition & 3 deletions tests/TestCase/ORM/QueryRegressionTest.php
Expand Up @@ -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) {
Expand Down

0 comments on commit da95589

Please sign in to comment.