일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- 젠킨스
- 스프링 시큐리티 로그인
- maven
- Spring Boot
- 리액트 캡차
- 리액트 심플캡차
- react 심플캡차
- 스프링 시큐리티
- git
- myBatis
- react simple captcha
- react 자동입력방지
- react captcha
- CI
- spring security 로그인
- SpringBoot
- ChatGPT
- error
- build
- jpa
- Security 로그인
- 에러
- 스프링
- react 상태
- Spring Security
- Docker
- react 캡차
- spring error
- 깃
- REACT
Archives
- Today
- Total
I can do it(Feat. DEV)
Could not determine type for:,at table:,for columns: ... 본문
개발자 모드/오류처리
Could not determine type for:,at table:,for columns: ...
까짓거 해보자 개발자 2022. 10. 26. 13:19728x90
개인프로젝트 도메인 관련 설정 중 위와 같은 에러 메세지를 만났음.
※에러메세지
Could not determine type for: ex.. , at table: ex.., for columns: [org.hibernate.mapping.Column(ex..)]
(ex.. 은 개인마다 달라서 예시로 적었음)
갓글에 검색해보니 두 Entity 간의 관계가 기술되지 않아서 발생한 문제라고 함.
즉, 도메인 필드는 만들었지만 어노테이션을 설정하지 않았거나,
옳바르지 않은 매핑 관계를 설정했을 때 등 에러가 발생함.
필자의 코드를 살펴보니
//article 도메인의 필드
@Comment(value = "게시판아이디")
@JoinColumn(name = "board_id")
//@ManyToOne을 추가해야함!!!
private Board board;
//board 도메인 필드
@Comment("게시글아이디")
@OneToMany
private List<Article> articles;
이런 식으로 설정되어 있었음.
board 도메인에서 일대다 매핑만 해놓고 article 도메인에서 다대일 매핑 설정을 안했던 것!!
@ManyToOne 설정을 추가 후 구동하니 에러 없이 잘 돌아가는 것을 확인함.
에러는 작은 실수에서 일어나는 것도 많다는데 이런 경우 인 듯..
다음부턴 좀 더 꼼꼼하게 설정을 해야겠음! 끝.
📢참조
Caused by: org.hibernate.MappingException: Could not determine type for: com.izeye.test.domain.VipAddress, at table: ServerGroup
스프링 (Spring) Data JPA에서 Entity 클래스 안에서 다른 Entity 클래스 타입의 맴버 변수 사용 시 다음과 같은 예외에 직면할 수 있다. Caused by: org.hibernate.MappingException: Could not determine type f..
devday.tistory.com
728x90
'개발자 모드 > 오류처리' 카테고리의 다른 글
[Git] Spring Boot + React 프로젝트 git에 add 안될 때 (0) | 2023.05.04 |
---|---|
Spring에서 ajax return 404 Error 날 때 (0) | 2023.03.08 |
[Error]The current branch master has no upstream branch. (0) | 2022.12.17 |
[Error]Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or @CollectionOfElements: (2) | 2022.10.26 |
예약 관련 프로세스 오류 처리 (0) | 2022.10.14 |