728x90
에러코드
Caused by: org.hibernate.AnnotationException: No identifier specified for entity: com.codestates.entity_mapping.single_mapping.Member
원인
: @Entity 애너테이션만 추가하고, 식별자 역할을 하는 멤버변수에 @Id 애너테이션을 추가하지 않은 경우 발생
해결방법
: 식별자역할 멤버변수(일반적으로 엔티티이름Id 형식)에 @Id 애너테이션 붙이기
권장사항
: 파라미터가 없는 기본 생성자를 필수로 추가하기
728x90
'Java & Spring > Error' 카테고리의 다른 글
[Gradle] 잘못된 gradle jvm 구성을 발견했습니다 (0) | 2022.09.02 |
---|---|
[에러해결] Git remote 문제 해결 (Windows) (0) | 2022.09.01 |
[에러해결] IntelliJ to Postman - 한글깨짐 오류 (0) | 2022.08.30 |
[에러해결] postman - Caused by: java.lang.NumberFormatException: For input string: "1,size=20" (0) | 2022.08.30 |
[에러해결] Note: Recompile with -Xlint:unchecked for details. (0) | 2022.08.30 |