/** * @param array $productIds * @throws \Magento\Framework\Exception\LocalizedException * @return void */ protected function deleteOldLinks($productIds) { if ($this->getBehavior() != \Magento\ImportExport\Model\Import::BEHAVIOR_APPEND) { $this->connection->delete($this->productLink->getMainTable(), $this->connection->quoteInto('product_id IN (?) AND link_type_id = ' . $this->getLinkTypeId(), $productIds)); } }