org.springframework.dao.DataIntegrityViolationException: could not execute statement;
@Entity
@Table(name = "GROUP")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class ContactGroup implements Serializable{
private static final long serialVersionUID = 7161778136151592279L;
@Id
@GenericGenerator(name = "increment", strategy = "increment")
@GeneratedValue(generator = "increment")
@Column(name = "GRP_ID")
private Long id;
}
In my entity id is the primary key when insert the data first time it was running and insert with id 1 and if I run again It will gives error Can you please tell me What did I wrong