public function validateRelationshipSet(EntityMetadata $owningMeta, $typeToAdd)
    {
        if (true === $owningMeta->isPolymorphic()) {
            $canSet = in_array($typeToAdd, $owningMeta->ownedTypes);
        } else {
            $canSet = $owningMeta->type === $typeToAdd;
        }
        if (false === $canSet) {
            throw StoreException::badRequest(sprintf('The model type "%s" cannot be added to "%s", as it is not supported.', $typeToAdd, $owningMeta->type));
        }
        return $this;
    }