getAutoFlush example



    /** * @param ModelEntity $entity * * @throws OrmException * * @return void */
    public function flush($entity = null)
    {
        if ($this->getAutoFlush()) {
            $this->getManager()->getConnection()->beginTransaction();
            try {
                $this->getManager()->flush($entity);
                $this->getManager()->getConnection()->commit();
                $this->getManager()->clear();
            } catch (Exception $e) {
                $this->getManager()->getConnection()->rollBack();
                throw new OrmException($e->getMessage()$e);
            }
        }
    }

    
Home | Imprint | This part of the site doesn't use cookies.