79327523

Date: 2025-01-03 19:51:01
Score: 1.5
Natty:
Report link

I also experienced this issue in a @DataJpaTest. I had a class that had an auto-generated ID like below.

  @Id
  @GeneratedValue(generator = "system-uuid")
  @GenericGenerator(name = "system-uuid", strategy = "uuid2")
  private String id;

I was then setting this ID manually before calling .save(). After I stopped manually setting the ID before the save I no longer received this exception.

Reasons:
  • Has code block (-0.5):
  • User mentioned (1): @DataJpaTest
  • Low reputation (1):
Posted by: chessgeek2000