protected function storeCollection($entities)
    {
        $this->adapter->beginTransaction();

        foreach ($entities as $entity) {
            $this->storeEntity($entity);
        }

        $this->adapter->commit();

        return $entities;
    }
protected function storeCollection($entities)
    {
        $this->adapter->beginTransaction();

        foreach ($entities as $entity) {
            $this->storeEntity($entity);
        }

        $this->adapter->commit();

        return $entities;
    }
protected function storeCollection ( $ entities ) { $ this -> adapter -> beginTransaction ( ) ; foreach ( $ entities as $ entity ) { $ this -> storeEntity ( $ entity ) ; } $ this -> adapter -> commit ( ) ; return $ entities ; }
Store an entity collection inside a single DB Transaction.

@param \Traversable|array $entities

@throws \InvalidArgumentException
@throws MappingException

@return \Traversable|array
Store an entity collection inside a single DB Transaction .