Domain/BaseDomain.php
protected function flushTransaction($object = null)
    {
        $violations = new ConstraintViolationList();

        try {
            $this->om->flush();

            if (null !== $this->connection && null === $object) {
                $this->connection->commit();
            }
        } catch (\Exception $e) {
            $this->flushTransactionException($e, $violations, $object);
        }

        return $violations;
    }
protected function flushTransaction($object = null)
    {
        $violations = new ConstraintViolationList();

        try {
            $this->om->flush();

            if (null !== $this->connection && null === $object) {
                $this->connection->commit();
            }
        } catch (\Exception $e) {
            $this->flushTransactionException($e, $violations, $object);
        }

        return $violations;
    }
protected function flushTransaction ( $ object = null ) { $ violations = new ConstraintViolationList ( ) ; try { $ this -> om -> flush ( ) ; if ( null !== $ this -> connection && null === $ object ) { $ this -> connection -> commit ( ) ; } } catch ( \ Exception $ e ) { $ this -> flushTransactionException ( $ e , $ violations , $ object ) ; } return $ violations ; }
Flush data in database with automatic declaration of the transaction for the collection.

@param null|object $object The resource for auto commit or null for flush at the end

@return ConstraintViolationList
Flush data in database with automatic declaration of the transaction for the collection .