일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- react 자동입력방지
- 리액트 심플캡차
- Docker
- spring security 로그인
- Spring Boot
- react captcha
- REACT
- maven
- react 상태
- 배치파일로 JDK 버전변경
- git
- react 심플캡차
- 스프링
- 에러
- 계층구조vs도메인구조
- build
- Spring Security
- 리액트 캡차
- 스프링 시큐리티
- 속도기능개선
- SpringBoot
- 스프링 시큐리티 로그인
- Security 로그인
- react 캡차
- react simple captcha
- 백엔드 아키텍처
- error
- 깃
- spring
- spring error
Archives
- Today
- Total
I can do it(Feat. DEV)
[Error]Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or @CollectionOfElements: 본문
개발자 모드/오류처리
[Error]Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or @CollectionOfElements:
까짓거 해보자 개발자 2022. 10. 26. 10:29728x90
게시판과 게시글 도메인을 만들던 중 에러를 만났음.
※에러 메세지
- Illegal attempt to map a non collection as a @OneToMany,@ManyToMany or @CollectionOfElements: 도메인 경로
파파고 번역기를 돌려보니
비 컬렉션을 @OneToMany, @ManyToMany 또는 @CollectionOfElements로 매핑하려는 잘못된 시도:
라는 뜻이였음.
거두절미하고 갓글 검색하여 얻은 해결방법 !!
일대다인 @OneToMany를 설정한 Article을 List로 변경해야 한다는 것.
※해결방법
//이전 코드
@OneToMany
private Article article;
//변경된 코드
@OneToMany
private List<Article> articles;
필자가 일대다로 설정했는데 멍청 멍청하게 List 형태로 바꾸지 않았음...🤭
에러 해결!
📢참조
https://ppusari.tistory.com/183
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 |
Could not determine type for:,at table:,for columns: ... (0) | 2022.10.26 |
예약 관련 프로세스 오류 처리 (0) | 2022.10.14 |