반응형
JPA를 이용하여 H2 database에 Insert를 하다가
H2 database: NULL not allowed for column "ID"
이런 에러가 발생했다.
@GeneratedValue 때문이라고 한다.
@GeneratedValue(strategy = GenerationType.IDENTITY) 로 변경해주면 해결!
반응형
'Database > H2' 카테고리의 다른 글
H2 Database 설치 (0) | 2022.08.25 |
---|---|
H2 Database 설치후 첫 실행시 Database "xxxx" not found, and IFEXISTS=true, so we cant auto-create it 에러 발생 (0) | 2019.12.02 |