We have such repository
class CronInfoCharacterInfoRepository extends EntityRepository
{
/**
* @param string|integer $characterID
* @return void
*/
public function add($characterID)
{
if (!$this->find($characterID)) {
$oEntry = new CronInfoCharacterInfo();
$oEntry->setCharacterID($characterID);
$this->getEntityManager()->persist($oEntry);
$this->getEntityManager()->flush();
}
}
}
But I want insert new entry by DQL. How can I do this through $this->createQueryBuilder()... ? And is it normal to use 'entity manager' inside repository?