public function remove($code)
    {
        $entityManager = $this->getEntityManager();

        $queryBuilder = $entityManager->createQueryBuilder();
        $queryBuilder
            ->delete($this->entityName(), 'p')
            ->where('p.code = :code')
            ->setParameter('code', $code);

        return $queryBuilder->getQuery()->execute();
    }