Skip to content

Commit

Permalink
Hopefully fixed SQL server this time
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Aug 16, 2014
1 parent 4b9ee0d commit c052437
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions src/Database/IdentifierQuoter.php
Expand Up @@ -190,13 +190,12 @@ protected function _quoteComparison(Comparison $expression) {
}
$expression->field($quoted);
} elseif ($field instanceof ExpressionInterface) {
$expression->field($this->quoteExpression($field));
$this->quoteExpression($field);
}

$value = $expression->getValue();
if ($value instanceof ExpressionInterface) {
$this->quoteExpression($value);
$expression->value($value);
}
}

Expand Down
8 changes: 3 additions & 5 deletions tests/TestCase/Database/QueryTest.php
Expand Up @@ -871,11 +871,9 @@ public function testSelectWhereUsingExpressionInField() {
$field = clone $exp;
$field->add('SELECT min(id) FROM comments');
return $exp
->gt($field, 100, 'integer');
});

debug($result->sql());
$rsult = $result->execute();
->eq($field, 100, 'integer');
})
->execute();
$this->assertCount(0, $result);
}

Expand Down

0 comments on commit c052437

Please sign in to comment.