Skip to content

Commit

Permalink
Use an expression object.
Browse files Browse the repository at this point in the history
MySQL and Postgres don't like string SQL snippets.
  • Loading branch information
markstory committed Jan 26, 2016
1 parent 7f35697 commit 21d5d07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/TestCase/ORM/Association/BelongsToManyTest.php
Expand Up @@ -993,7 +993,7 @@ public function testEagerLoadingBelongsToManyLimitedFieldsWithAutoFields()
$result = $table
->find()
->contain(['Tags' => function ($q) {
return $q->select(['two' => '1 + 1'])->autoFields(true);
return $q->select(['two' => $q->newExpr('1 + 1')])->autoFields(true);
}])
->first();

Expand Down

0 comments on commit 21d5d07

Please sign in to comment.