0
我想在我的Doctrine2查詢生成器中使用DAY()和YEAR()函數。但不知何故,我不斷收到錯誤:Doctrine2 loading學習擴展
Fatal error: Uncaught Doctrine\ORM\Query\QueryException: SELECT DAY(h.date) AS day FROM Entities\Hit h GROUP BY day in
PHP代碼:
$totalHits = $this->registry->entityManager->getRepository('Entities\Hit')
->createQueryBuilder('h')
->select('DAY(h.date) AS day')
->groupBy('day')
->getQuery()->getResult();`
通過加載作曲家或通過磁帶自動加載機doctrineExtensions不會解決它:
$classLoader = new \Doctrine\Common\ClassLoader('DoctrineExtensions', __DIR__.'/../vendor/beberlei/DoctrineExtensions');
$classLoader->register();
上午我裝DoctrineExtensions是錯誤的還是還有別的?