Uploaded image for project: 'Doctrine 2 - ORM'
  1. Doctrine 2 - ORM
  2. DDC-1347

Github-PR-110 by shesek: Support NULL in EntityRepository's magic findBy and findOneBy methods


    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Security Level: All
    • Labels:


      This issue is created automatically through a Github pull request on behalf of



      Url: https://github.com/doctrine/doctrine2/pull/110


      The magic `findBy` and `findOneBy` methods don't support passing NULL as the value, because ["we cannot (yet) transform it into IS NULL"](https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/EntityRepository.php#L207).

      However, `BasicEntityPersister::_getSelectConditionSQL()` [does support that](https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php#L1229). 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.


        beberlei Benjamin Eberlei created issue -
        beberlei Benjamin Eberlei made changes -
        Field Original Value New Value
        Workflow jira [ 12968 ] jira-feedback [ 13962 ]
        beberlei Benjamin Eberlei made changes -
        Workflow jira-feedback [ 13962 ] jira-feedback2 [ 15826 ]
        beberlei Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 15826 ] jira-feedback3 [ 18082 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={expand=changesets[0:20].revisions[0:29],reviews, query=DDC-1347}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)


          • Assignee:
            beberlei Benjamin Eberlei
            beberlei Benjamin Eberlei
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: