0
@PatchRequest를 사용하여 API를 테스트하려고 시도했지만 다음 오류가 발생합니다.@PatchRequest를 사용하여 특정 필드 만 업데이트
SEVERE: Servlet.service() for servlet [dispatcher] in context with path [/intranet-api] threw exception [Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: could not execute batch; SQL [update portal.dbo.DANCE_MASTER set name=?, age=?, gender=?, grade=?,status=?, updated_by=?, updated_ts=? where id=?]; constraint [null]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute batch] with root cause
java.sql.BatchUpdateException: Cannot insert the value NULL into column 'name', table 'ctcportal1.dbo.DANCE_MASTER'; column does not allow nulls. UPDATE fails.
오류로 인해 모든 필드에 대해 업데이트 된 값을 제공해야합니다. 그러나 테이블의 특정 필드 만 업데이트하려고합니다.
안녕하세요.하지만 모든 필드가 아닌 특정 필드 만 업데이트하고 싶습니다. 내가 어떻게 할 수 있는지 알 겠어. 그것이 putRequest 또는 PostRequest를 사용하는 대신 patchRequest를 사용하는 나의 이유입니다. – Learner
은 spring dao code 관련 업데이트 기록과 관련된 코드를 공유합니다. – nayakam