entityManager = $entityManager; $this->container = $container; } public function createOptionWithoutFlush(EntityManagerInterface $entityManager, WorkflowProjectOptions $option) { $entityManager->persist($option); return $entityManager; } public function removeByExport(int $id) { $connection = $this->container->get('doctrine.dbal.projects_connection'); $sql = ' DELETE wpo FROM `export_workflow_options` as wpo INNER JOIN export_workflow AS wp ON wpo.workflowProject_id = wp.id WHERE wp.export_id = ' . $id; $stmt = $connection->prepare($sql); $stmt->execute(); if ($stmt->rowCount() > 0) { return true; } else { return false; } } }