original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: Gets the MongoDB Collection object for a Model.
  
  @param   EntityMetadata  $metadata
  @return  \Doctrine\MongoDB\Collection
docstring_tokens: Gets the MongoDB Collection object for a Model .