mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-1347: Github-PR-110 by shesek: Support NULL in EntityRepository's magic findBy and findOneBy methods #1691
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?
Originally created by @doctrinebot on GitHub (Aug 25, 2011).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user @beberlei:
This issue is created automatically through a Github pull request on behalf of {username}:
Url: https://github.com/doctrine/doctrine2/pull/110
Message:
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.@malukenho commented on GitHub (Jan 5, 2017):
@Ocramius can be closed as it would cause BC break
@lcobucci commented on GitHub (Jan 5, 2017):
I think it was already solved on #153
@kimhemsoe commented on GitHub (Jan 5, 2017):
We do support findby(["name" => null]) today. If i remember correct we got the support in 2.5
@Ocramius commented on GitHub (Jan 5, 2017):
Indeed, closing as dupe.