org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [com.example.FifthSpring.model.PlayListArticle#2]
기존 코드
public class PlayListArticle {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
수정된 코드
public class PlayListArticle {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@JsonIgnore
private Long id;
@GeneratedValue
IDENTITY : DB에서 자동으로 생성 SEQUENCE : DB의 시퀀스를 이용해 숫자 값 생성Auto : 기본 값으로 사용Identity 전략TABLE : 테이블을 이용해 키를 저장
