public function createCollection(RelationshipMetadata $relMeta, array $references = null)
    {
        $metadata = $this->getMetadataForType($relMeta->getEntityType());
        if (empty($references)) {
            $references = [];
        }
        if (false === $this->isSequentialArray($references)) {
            throw StoreException::badRequest(sprintf('Improper has-many data detected for relationship "%s" - a sequential array is required.', $relMeta->getKey()));
        }
        $models = [];
        foreach ($references as $reference) {
            $models[] = $this->loadProxyModel($reference['type'], $reference['id']);
        }
        return new Collections\Collection($metadata, $this, $models, count($models));
    }