OrmException example


    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);
            }
        }
    }

    /** * @param array<array-key, array<string, mixed>> $data * * @throws BatchInterfaceNotImplementedException * * @return array<array-key, array<string, mixed>> */
    
Home | Imprint | This part of the site doesn't use cookies.