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();
    }
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();
    }
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 ( ) ; }
Removes the given persistence code.

@param  string $code

@return bool|null
Removes the given persistence code .