repository단에 동적 쿼리가 담긴 메소드를 작성한 후 잘 돌아가는지 테스트하려고 하는데 위와 같은 에러가 떴다.
알고보니 내가 동적으로 쿼리를 날리는 경우라면 NativeQuery를 True로 설정해야하는 것이다.
@Query(value = "select * from member_status where user_profile_idx = :userProfileIdx limit 1", nativeQuery = True)
다음과 같이 NativeQuery를 True로 선언해주니 바로 해결했다!
'trouble shooting' 카테고리의 다른 글
[wsl] wslregisterdistribution failed with error: 0x80370102 (0) | 2023.01.31 |
---|---|
[JPA] query did not return a unique result (0) | 2023.01.30 |
[JPA] Parameter value [1] did not match expected type [com.example.relayRun.user.entity.UserEntity (n/a)] (0) | 2023.01.30 |
@Value(value annotation) 인식 불가 (0) | 2023.01.24 |
[SpringBoot] java.sql.SQLException: Field 'level' doesn't have a default value (0) | 2023.01.22 |