NAJU-Sachsen / NAJU-Adebar

Management tool used by the NAJU Sachsen to keep track of volunteers and the like.
http://naju-sachsen.de
GNU General Public License v3.0
0 stars 0 forks source link

May not add more than one subscriber to newsletters #59

Closed rbergm closed 5 years ago

rbergm commented 5 years ago

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.

rbergm commented 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.