mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-1355: No Result inconsistency between Repository::find and Repository::findOneBy #1703
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 (Sep 1, 2011).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user jelte:
When no result is found by the find() method a NoResultException is throw, but when no result is found by the findOneBy() method a null value is returned.
it would be more logical that the findOneBy() would also throw a NoResultException as you expect to find one entity.
as the following code does not work.
while the following does
Note: I used "id" as criteria to illustrate the inconsistency.
@doctrinebot commented on GitHub (Sep 3, 2011):
Issue was closed with resolution "Invalid"