본문 바로가기

에러 해결

[Spring Boot] Can not issue data manipulation statements with executeQuery() 오류

JPA update, delete 사용시

@Transactional
@Modifying

어노테이션 추가

 

@Transactional
@Modifying
@Query(value = "delete user where user_id = :userId", nativeQuery = true)
void deleteId(Long userId);
반응형