You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fiddling around with this project for work, The TutorialController.java @PostMapping createTutorial function contains a logic bug.
TutorialController.java, Line 66-67 will always force the published bool to be false:
Tutorial _tutorial = tutorialRepository
.save(new Tutorial(tutorial.getTitle(), tutorial.getDescription(), false));
This in my opinion should be updated to:
Tutorial _tutorial = tutorialRepository.save(new Tutorial
(tutorial.getTitle(), tutorial.getDescription(), tutorial.isPublished()));
For big datasets this will corrupt your "published" boolean column and will result in one having to manually run SQL commands to update your dataset should you choose to hook it to a localdb.
The text was updated successfully, but these errors were encountered:
Fiddling around with this project for work, The TutorialController.java @PostMapping createTutorial function contains a logic bug.
TutorialController.java, Line 66-67 will always force the published bool to be false:
Tutorial _tutorial = tutorialRepository
.save(new Tutorial(tutorial.getTitle(), tutorial.getDescription(), false));
This in my opinion should be updated to:
Tutorial _tutorial = tutorialRepository.save(new Tutorial
(tutorial.getTitle(), tutorial.getDescription(), tutorial.isPublished()));
For big datasets this will corrupt your "published" boolean column and will result in one having to manually run SQL commands to update your dataset should you choose to hook it to a localdb.
The text was updated successfully, but these errors were encountered: