mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1696: String support in THEN and ELSE part of CASE expression is broken #2136
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 (Mar 11, 2012).
Originally assigned to: @guilhermeblanco on GitHub.
Jira issue originally created by user @asm89:
The SQL generated when using strings in the THEN and ELSE parts of the CASE expression are not valid.
This testcase will fail:
$this->assertSqlGeneration(
"SELECT g.id, CASE WHEN ((g.id / 2) > 18) THEN 'Foo' ELSE 'Bar' END AS test FROM Doctrine\Tests\Models\CMS\CmsGroup g",
"SELECT c0_.id AS id0, CASE WHEN (c0_.id / 2 > 18) THEN 'Foo' ELSE 'Bar' END AS sclr1 FROM cms_groups c0_"
);
Noticed by a user at github:
https://github.com/doctrine/doctrine2/pull/277
https://github.com/doctrine/doctrine2/pull/278
@doctrinebot commented on GitHub (Mar 12, 2012):
Comment created by @guilhermeblanco:
Fixed by
7954386705@beberlei please merge in 2.2! =D
@doctrinebot commented on GitHub (Mar 12, 2012):
Issue was closed with resolution "Fixed"