skip to Main Content

Postgresql – DATA/JPA Entity with String key – but replace data when try to save object with same key

I have this Entity class with nickname String as a key. @Data @Entity @Table(name="players") public class Player { @Id private String nickname; @Column(name="name") private String name; @Column(name="surname") private String surname; ... ... ... } Controller @PostMapping(value="/addPlayer", consumes = {MediaType.APPLICATION_JSON_VALUE}, produces…

VIEW QUESTION
Back To Top
Search