79525495

Date: 2025-03-21 12:55:07
Score: 3
Natty:
Report link

Alright. I found it thanks to this article Medium article. Basically I add to set the id to null before saving it, but because of the constraints on my Class I needed to have an id in the csv file for the csv parsing

So in the setup method I did :

public void setupNews(News news) {
        news.setId(null);
        newsRepository.save(news);
        }
    }
Reasons:
  • Blacklisted phrase (0.5): thanks
  • Blacklisted phrase (1): this article
  • Blacklisted phrase (0.5): I need
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Gwendal