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

[GH-234] Criteria filtering doesn't work with DateTime instance

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

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

      Url: https://github.com/doctrine/common/pull/234

      Message:

      Filtering associations doesn't work with DateTime instance as a comparison value because filtering uses === operator. It works with SQL backed filtering, but not on PHP collection level.

      ```php
      $criteria = Criteria::create()
      >where(Criteria::expr()>eq("birthday", new \DateTime("1982-02-17")))
      ->orderBy(array("username" => "ASC"))
      ->setFirstResult(0)
      ->setMaxResults(20)
      ;
      ```

        Issue Links

          Activity

            People

            • Assignee:
              guilhermeblanco Guilherme Blanco
              Reporter:
              beberlei Benjamin Eberlei
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: