public function aClearEntityTable($className, $andWhere = null) {
        $doctrine = $this->getDoctrine();
        $em = $doctrine->getManager();
        if ($em->getFilters()->isEnabled('softdeleteable')) {
            $em->getFilters()->disable('softdeleteable');
        }
        if ($className === \Pandco\Bundle\AppBundle\Entity\User\DigitalAccount\TimeWithdraw::class) {
            $query = $em->createQuery("UPDATE " . \Pandco\Bundle\AppBundle\Entity\App\User\DigitalAccount\DigitalAccountConfig::class . " dac SET dac.timeWithdraw = null");
            $query->execute();
        }
        $query = $em->createQuery("DELETE FROM " . $className . " " . $andWhere);
        $query->execute();
        $em->flush();
        $em->clear();
    }
public function aClearEntityTable($className, $andWhere = null) {
        $doctrine = $this->getDoctrine();
        $em = $doctrine->getManager();
        if ($em->getFilters()->isEnabled('softdeleteable')) {
            $em->getFilters()->disable('softdeleteable');
        }
        if ($className === \Pandco\Bundle\AppBundle\Entity\User\DigitalAccount\TimeWithdraw::class) {
            $query = $em->createQuery("UPDATE " . \Pandco\Bundle\AppBundle\Entity\App\User\DigitalAccount\DigitalAccountConfig::class . " dac SET dac.timeWithdraw = null");
            $query->execute();
        }
        $query = $em->createQuery("DELETE FROM " . $className . " " . $andWhere);
        $query->execute();
        $em->flush();
        $em->clear();
    }
public function aClearEntityTable ( $ className , $ andWhere = null ) { $ doctrine = $ this -> getDoctrine ( ) ; $ em = $ doctrine -> getManager ( ) ; if ( $ em -> getFilters ( ) -> isEnabled ( 'softdeleteable' ) ) { $ em -> getFilters ( ) -> disable ( 'softdeleteable' ) ; } if ( $ className === \ Pandco \ Bundle \ AppBundle \ Entity \ User \ DigitalAccount \ TimeWithdraw :: class ) { $ query = $ em -> createQuery ( "UPDATE " . \ Pandco \ Bundle \ AppBundle \ Entity \ App \ User \ DigitalAccount \ DigitalAccountConfig :: class . " dac SET dac.timeWithdraw = null" ) ; $ query -> execute ( ) ; } $ query = $ em -> createQuery ( "DELETE FROM " . $ className . " " . $ andWhere ) ; $ query -> execute ( ) ; $ em -> flush ( ) ; $ em -> clear ( ) ; }
Limia una tabla de la base de datos
@example Given a clear entity "Pandco\Bundle\AppBundle\Entity\EPR\Sales\SalesInvoice" table
@Given a clear entity :className table
@Given a clear entity :className table and where :where
Limia una tabla de la base de datos