반응형
org.springframework.dao.InvalidDataAccessApiUsageException: Executing an update/delete query
➡️ 해결방안
//@Modifying
//@Query(value = "INSERT INTO member (test) VALUES (:test)", nativeQuery = true)
//void saveSocialMember(String testText);
//-> 수정
@Transactional
@Modifying
@Query(value = "INSERT INTO member (test) VALUES (:test)", nativeQuery = true)
void saveSocialMember(String testText);
org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: Check constraint violation: "CONSTRAINT_875: ";
➡️해결방안
쿼리문에서 제약조건 위반으로 생긴 에러
쿼리문을 Entity에 걸어준 조건에 맞게 수정하여 해결(이번 경우에는 enum의 요소로 String 대문자를 받았었는데, 요청을 소문자로 해서 발생)
반응형
'Backend > Spring | SpringBoot' 카테고리의 다른 글
[egovFramework] spring message이용 (0) | 2024.05.17 |
---|---|
[Spring Security] Header정보 추가 시점 (0) | 2024.05.10 |
[Oauth2.0] Kakao Oauth2 연동 (0) | 2024.05.09 |
[Oauth2.0] Oauth2.0 서비스 & WebFlux (0) | 2024.05.02 |
[JPA] Method is only allowed for a query (0) | 2024.04.30 |