[DCOM-152] [GH-234] Criteria filtering doesn't work with DateTime instance Created: 17/Dec/12  Updated: 21/Apr/14  Resolved: 21/Apr/14

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Guilherme Blanco
Resolution: Won't Fix Votes: 0
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)
;
```



 Comments   
Comment by Doctrine Bot [ 03/Feb/14 ]

A related Github Pull-Request [GH-234] was closed:
https://github.com/doctrine/common/pull/234

Comment by Guilherme Blanco [ 21/Apr/14 ]

As a resolution happened 3 months ago, this issue is now marked as won't fix.

Commit reference: https://github.com/doctrine/collections/commit/5e2d9cfe6a3d8eb2906f805a27c27ba3e5f2140c

Generated at Mon Sep 22 12:28:40 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.