$em = $this->getDoctrine()->getEntityManager();
$repository = $em->getRepository('UserBundle:items');
$items = $repository->findOneBy(
array('isCancel' => false,
'user' => $username,
array('toDate' => 'ASC'));
我想添加比较功能
where registeredtime > now()
我可以用 findOneBy 来比较句子吗?
或者我必须写整个sql?