public function getModelCollection(EntityMetadata $metadata)
    {
        if (!$metadata->persistence instanceof StorageMetadata) {
            throw PersisterException::badRequest('Wrong StorageMetadata type');
        }
        return $this->connection->selectCollection($metadata->persistence->db, $metadata->persistence->collection);
    }
public function getModelCollection(EntityMetadata $metadata)
    {
        if (!$metadata->persistence instanceof StorageMetadata) {
            throw PersisterException::badRequest('Wrong StorageMetadata type');
        }
        return $this->connection->selectCollection($metadata->persistence->db, $metadata->persistence->collection);
    }
public function getModelCollection ( EntityMetadata $ metadata ) { if ( ! $ metadata -> persistence instanceof StorageMetadata ) { throw PersisterException :: badRequest ( 'Wrong StorageMetadata type' ) ; } return $ this -> connection -> selectCollection ( $ metadata -> persistence -> db , $ metadata -> persistence -> collection ) ; }
Gets the MongoDB Collection object for a Model.

@param   EntityMetadata  $metadata
@return  \Doctrine\MongoDB\Collection
Gets the MongoDB Collection object for a Model .