DDC-1087: Repository::findBy and Repository::findOneBy NULL invalid query #1360

Open
opened 2026-01-22 13:11:42 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Mar 29, 2011).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user vrtak-cz:

$repository->findBy(array('foo' => NULL)); // or findOneBy

convert to invalid query:

SELECT f.* FROM foo f  WHERE f.foo = NULL;

in MySQL doesn't same as valid:

SELECT f.* FROM foo f  WHERE f.foo IS NULL;
Originally created by @doctrinebot on GitHub (Mar 29, 2011). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user vrtak-cz: ``` $repository->findBy(array('foo' => NULL)); // or findOneBy ``` convert to invalid query: ``` sql SELECT f.* FROM foo f WHERE f.foo = NULL; ``` in MySQL doesn't same as valid: ``` sql SELECT f.* FROM foo f WHERE f.foo IS NULL; ```
admin added the Bug label 2026-01-22 13:11:42 +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#1360