New to Symfony & Doctrine
I trying to fetch a selection of objects from a MySQL database via Doctrine in a Symfony project. I am doing this with createQueryBuilder;
$repository = $this->getDoctrine()
->getRepository('mcsyncBundle:DB');
$query = $repository->createQueryBuilder('p')
->select('p')
->where('(p.created=:)' . $till)
->setParameter('created', $till)
->orderBy('p.created', 'ASC')
->getQuery();
$PackDB = $query->getResult();
But I keep getting the error:
*Method 'QueryBuilder' not found in class \Doctrine\Common\Persistence\ObjectRepository*.
Anyone that can explain (fix) this problem?
EDIT: This error is coming from inside PHPStorm by the way and NOT from Symfony itself