protected function removeNonExistentConditions(
        $conditionGroup,
        $conditionIds
    ) {
        foreach ($conditionGroup->getConditions() as $condition) {
            if ($condition->getId() && !in_array($condition->getId(), $conditionIds)) {
                $conditionGroup->removeCondition($condition);
                $this->em->remove($condition);
            }
        }
    }