src/Metadata/EntityMetadataFactory.php
public function createMetadata(array $relations, ObjectIdentifier $identifier)
    {
        $metadata = new Metadata($identifier);

        foreach ($relations as $field => $relation) {
            $metadata->setRelation($this->createRelation($field, $relation));
        }

        return $metadata;
    }
public function createMetadata(array $relations, ObjectIdentifier $identifier)
    {
        $metadata = new Metadata($identifier);

        foreach ($relations as $field => $relation) {
            $metadata->setRelation($this->createRelation($field, $relation));
        }

        return $metadata;
    }
@param array            $relations
@param ObjectIdentifier $identifier

@return Metadata