Closed rbergm closed 5 years ago
Apparently the strategy used for generating the primary keys is not correct. Right now we are using a plain @GeneratedValue
annotation - which leads to the described problems. Instead @GeneratedValue(strategy = IDENTITY)
should be used.
When adding the first subscriber to a newsletter everything works fine. However as soon as another subsriber should be added, a
DataIntegrityViolationException
is thrown.Apparently the primary key assigned to the new subscriber is not unique.