내 테이블 정의에 int 데이터 형식의 열이 있습니다. 값이 "0"이면 jdbcTemplate 업데이트 메소드가 기본적으로 "NULL"대신 "NULL"로이 필드를 업데이트해야합니다. Point Curing
이 not NULL
때Spring JDBCTemplate 업데이트 문제
this.jdbcTemplate.update("UPDATE GCUR_OBSERVATION "
+ "SET ObserverId = ?," + "ObservationDate = ?,"
+ "PointCuring = ?"
+ " WHERE locationId = ? AND ObservationStatus = 0",
new Object[] { new Integer(newObservation.getObserverId()),
newObservation.getObservationDate(),
new Integer(newObservation.getLocationId()) });
는 코드는 위의 잘 실행됩니다. 그러나 데이터베이스 테이블에 NULL
으로 어떻게 저장할 수 있습니까?