일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- jpa
- spring error
- react simple captcha
- Security 로그인
- myBatis
- maven
- build
- 스프링
- error
- react 자동입력방지
- Spring Security
- SpringBoot
- ChatGPT
- git
- REACT
- react 심플캡차
- 젠킨스
- 리액트 심플캡차
- 에러
- react 캡차
- CI
- react captcha
- 스프링 시큐리티 로그인
- 리액트 캡차
- react 상태
- Spring Boot
- 스프링 시큐리티
- spring security 로그인
- Docker
- 깃
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
Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or @CollectionOfElements
오류메시지 Illegal attempt to map a non collection as a @OneToMany, @ManyToMany or @CollectionOfElements 해결방법 아마도 당신은 as-is 처럼 되어 있을 것입니다. to-be 처럼 List 나 Set 과..
ppusari.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 |
Could not determine type for:,at table:,for columns: ... (0) | 2022.10.26 |
예약 관련 프로세스 오류 처리 (0) | 2022.10.14 |