I have an entity called Event, with a field startDate (type="date"), and another called slug (type="string"). I have created a controller action to get a specific event based on these parts. The router passes eventDate as the format 'Y-m-d', and the eventSlug. Now I have successfully created a DateTime object with $startDate = DateTime::createFromFormat('Y-m-d', $eventDate). Now if I issue
$event = $eventRepo->findOneBy(array(
'startDate' => $startDate,
'slug' => $eventSlug,
));
it gets nothing ($event is NULL). Do I miss something in Doctrine documentation, or did I find a bug?