Truble Shooting org.hibernate.MappingException: org.hibernate.dialect.identity.IdentityColumnSupportImpl does not support identity key generation

JunH·2022년 7월 29일
0

짤막팁

목록 보기
3/9

org.hibernate.MappingException: org.hibernate.dialect.identity.IdentityColumnSupportImpl does not support identity key generation

하이버네이트 키 생성 오류
@GeneratedValue 어노테이션 사용시

/* (strategy=GenerationType.IDENTITY) IDENTITY = AUTO_INCREMENT
SEQUENCE (ORACLE, PostgreSQL, DB2, H2)
TABLE :: Like sequence however create key building table (able ALL DB)
AUTO :: auto

  • 해당 특성들을 이해하지 못하고 막 갖다써서 일어난 오류였다.

h2 DB에서는 잘 작동하던 IDENTITY가 오라클로 넘어가니 알수없는 오류들을 뿜어내며 테이블이 생성되지 못하고있었는데 이를 해결하기 위해 제너레이션 타입을 바꿔주었더니 해결되었다.

0개의 댓글