mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-3763: Passing "false" boolean value to eq() function in query builder does not end up SQL query #4614
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Jun 9, 2015).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user danijeld:
$qb->andWhere($qb->expr()->eq('d.active', true));
produces:
[_dql:Doctrine\ORM\Query:private] => SELECT COUNT(r.id) FROM Game:Roll r INNER JOIN r.hand d WHERE d.userId = :userId AND d.active = 1
$qb->andWhere($qb->expr()->eq('d.active', false));
produces:
[_dql:Doctrine\ORM\Query:private] => SELECT COUNT(r.id) FROM Game:Roll r INNER JOIN r.hand d WHERE d.userId = :userId AND d.active =
and this query fails with an error:
[Syntax Error] line 0, col -1: Error: Expected Literal, got end of string.
As a workaround I am using 1 and 0 instead of "true" and "false"
@doctrinebot commented on GitHub (Jun 9, 2015):
@doctrinebot commented on GitHub (Jun 9, 2015):
Issue was closed with resolution "Duplicate"