mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #110] [MERGED] Support NULL in EntityRepository's magic findBy and findOneBy methods #7720
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?
📋 Pull Request Information
Original PR: https://github.com/doctrine/orm/pull/110
Author: @shesek
Created: 8/25/2011
Status: ✅ Merged
Merged: 10/17/2011
Merged by: @beberlei
Base:
master← Head:patch-1📝 Commits (3)
d314386we can (now) transform it into IS NULL5fc6277Oops, shouldn't have removed the condition completely... checking a parameter is provided2e389e0Removed blank line, used empty() instead of the count() check📊 Changes
1 file changed (+1 additions, -2 deletions)
View changed files
📝
lib/Doctrine/ORM/EntityRepository.php(+1 -2)📄 Description
The magic
findByandfindOneBymethods don't support passing NULL as the value, because "we cannot (yet) transform it into IS NULL".However,
BasicEntityPersister::_getSelectConditionSQL()does support that. It seems like leftovers from when there was no support for it. I tried it locally (after applying this change) and it does seem to work well.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.