Adapter/ShopwareAdapter/ServiceBus/CommandHandler/Variation/HandleVariationCommandHandler.php
private function correctProductAssignment($variationModel, $productIdentitiy)
    {
        if (null === $variationModel) {
            return;
        }

        if ((int) $productIdentitiy->getAdapterIdentifier() === $variationModel->getArticle()->getId()) {
            return;
        }

        $this->entityManager->getConnection()->update(
            's_articles_details',
            ['articleID' => $productIdentitiy->getAdapterIdentifier()],
            ['id' => $variationModel->getId()]
        );

        $this->logger->notice('migrated variation from existing product to connector handeled product.', [
            'variation' => $variationModel->getNumber(),
            'old shopware product id' => $variationModel->getArticle()->getId(),
            'new shopware product id' => $productIdentitiy->getAdapterIdentifier(),
        ]);
    }
private function correctProductAssignment($variationModel, $productIdentitiy)
    {
        if (null === $variationModel) {
            return;
        }

        if ((int) $productIdentitiy->getAdapterIdentifier() === $variationModel->getArticle()->getId()) {
            return;
        }

        $this->entityManager->getConnection()->update(
            's_articles_details',
            ['articleID' => $productIdentitiy->getAdapterIdentifier()],
            ['id' => $variationModel->getId()]
        );

        $this->logger->notice('migrated variation from existing product to connector handeled product.', [
            'variation' => $variationModel->getNumber(),
            'old shopware product id' => $variationModel->getArticle()->getId(),
            'new shopware product id' => $productIdentitiy->getAdapterIdentifier(),
        ]);
    }
migrating variation from one product to the correct connector handeled product

@param null|Detail $variationModel
@param Identity    $productIdentitiy