DDC-2205: Negative Values in Case Then expressions #2772

Closed
opened 2026-01-22 14:03:06 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Dec 18, 2012).

Jira issue originally created by user ibiryukov:

DQL Expression:

SELECT (CASE WHEN t.id = 1 THEN -1 ELSE t.id END) FROM Table t

Gives an error:
[Syntax Error] line 0, col 32: Error: Unexpected '-'

It doesn't seem to like the negative number.

Originally created by @doctrinebot on GitHub (Dec 18, 2012). Jira issue originally created by user ibiryukov: DQL Expression: SELECT (CASE WHEN t.id = 1 THEN -1 ELSE t.id END) FROM Table t Gives an error: [Syntax Error] line 0, col 32: Error: Unexpected '-' It doesn't seem to like the negative number.
admin added the Bug label 2026-01-22 14:03:06 +01:00
admin closed this issue 2026-01-22 14:03:07 +01:00
Author
Owner

@doctrinebot commented on GitHub (Dec 21, 2012):

Comment created by @FabioBatSilva:

Fixed : 8b5e4a9a52

@doctrinebot commented on GitHub (Dec 21, 2012): Comment created by @FabioBatSilva: Fixed : https://github.com/doctrine/doctrine2/commit/8b5e4a9a52670992b85e7223d255b98cf77a35a3
Author
Owner

@doctrinebot commented on GitHub (Dec 21, 2012):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Dec 21, 2012): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#2772