Uploaded image for project: 'Doctrine Common'
  1. Doctrine Common
  2. DCOM-214

Collection Criteria isNull does not work well


    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.4.1
    • Fix Version/s: None
    • Component/s: Collections
    • Security Level: All
    • Environment:
      PHP 5.4.4, PostgreSQL 9.1


      I'm using the Collection project https://github.com/doctrine/collections and its Criteria building part. I'm not sure if I'm putting this bug to the good project. Please, correct me if not.

      There is bug in method isNull: https://github.com/doctrine/collections/blob/master/lib/Doctrine/Common/Collections/ExpressionBuilder.php#L125

      This produces SQL command where is 'IS ?' and null value is passed as param. This is fail.

      Code example:

        $expr = Criteria::expr();
        $criteria = Criteria::create()
      	->where($expr->lte('num', 42))
        return $this->myCollection->matching($criteria);

      This produces SQL:

       SELECT ... FROM ... WHERE num <= ? AND deleted IS ? 

      with params

      [ 42, null ]


        honzap Jan Pecek created issue -

        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=DCOM-214}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)


          • Assignee:
            beberlei Benjamin Eberlei
            honzap Jan Pecek
          • Votes:
            0 Vote for this issue
            1 Start watching this issue


            • Created: