[PR #277] Update lib/Doctrine/ORM/Query/AST/GeneralCaseExpression.php #7957

Closed
opened 2026-01-22 15:57:43 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/277

State: closed
Merged: No


Changed to make the CASE EXPRESSION uses strings into DQL's.

e.g.

$source = $this->em->createQueryBuilder()
    ->select('m')
            ->addSelect("CASE WHEN (date >= newDate) THEN 'Active' ELSE 'Inactive' END status")
    ->from('sys:Mask', 'm')
    ->orderBy('status', 'ASC');
**Original Pull Request:** https://github.com/doctrine/orm/pull/277 **State:** closed **Merged:** No --- Changed to make the CASE EXPRESSION uses strings into DQL's. e.g. ``` $source = $this->em->createQueryBuilder() ->select('m') ->addSelect("CASE WHEN (date >= newDate) THEN 'Active' ELSE 'Inactive' END status") ->from('sys:Mask', 'm') ->orderBy('status', 'ASC'); ```
admin added the pull-request label 2026-01-22 15:57:43 +01:00
admin closed this issue 2026-01-22 15:57:43 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#7957