java.lang.IllegalStateException: For queries with named parameters you need to use provide names for method parameters.
Use @Param for query method parameters, or when on Java 8+ use the javac flag -parameters.
에러
@Modifying
@Query("update Board p set p.view = p.view + 1 where p.id = :id")
int updateView(Long id);
에러가 뜬 부분
@Modifying
@Query("update Board p set p.view = p.view + 1 where p.id = :id")
int updateView(@Param("id") Long id);
해결!
참고 👇
https://zzang9ha.tistory.com/357
반응형
'ORM > JPA' 카테고리의 다른 글
[Error] org.hibernate.LazyInitializationException: could not initialize proxy (0) | 2022.07.20 |
---|---|
@JoinColumn (0) | 2022.05.19 |
변경 감지(Dirty Checking) (0) | 2022.05.18 |
JPA를 이용한 데이터베이스 초기화 (0) | 2022.03.31 |
[Error] No default constructor for entity (0) | 2022.01.25 |