[PR #5554] Treat boolean as string in Expr\Comparison #9643

Open
opened 2026-01-22 16:04:57 +01:00 by admin · 0 comments
Owner

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

State: closed
Merged: No


Hi,

I was getting an error when I try to use comparison with boolean false.

Here my issue: when you are calling $queryBuilder->set('o.enabled', false) then the result is o.enabled = and then you have an SQL exception.

This PR allow to use boolean for comparison.
For example, you can now use ->set('o.enabled', false) instead of ->set('o.enabled', 'false')

The previous exemple will give o.enabled = false.

What do you think of it ?

**Original Pull Request:** https://github.com/doctrine/orm/pull/5554 **State:** closed **Merged:** No --- Hi, I was getting an error when I try to use comparison with boolean false. Here my issue: when you are calling `$queryBuilder->set('o.enabled', false)` then the result is `o.enabled =` and then you have an SQL exception. This PR allow to use boolean for comparison. For example, you can now use `->set('o.enabled', false)` instead of `->set('o.enabled', 'false')` The previous exemple will give `o.enabled = false`. What do you think of it ?
admin added the pull-request label 2026-01-22 16:04:57 +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#9643