Same error on the class file as well. Do I really need the @GeneratedValue(strategy=GenerationType.IDENTITY) . Since in this case, my database will automatically generate the value for me, instead of the persistence provider?
I read from the Java API docs, it says that if we have @Column(insertable=false) , the persistence provider will ignore this column for the insert statement. But for me it is not happening, every time it still insert to the column, which at the end will throw error, because of having the same primary key.