The new Main of the Question Generator is designed to remove the current questions and introduces new ones. The problem is that it should be a transaction, that is, is something goes wrong the old questions won't be removed.
The PersistentMain.class will change, so that the main method would have these lines:
The new populate method in the QuestionRepository will be a transaction, will remove all the present questions and insert all the new ones, which receive as a parameter.
The new Main of the Question Generator is designed to remove the current questions and introduces new ones. The problem is that it should be a transaction, that is, is something goes wrong the old questions won't be removed.
The PersistentMain.class will change, so that the main method would have these lines:
instead of the current
The new populate method in the QuestionRepository will be a transaction, will remove all the present questions and insert all the new ones, which receive as a parameter.