error : Null value was assigned to a property
[ JPA ] [ mysql ] column type error
Null value was assigned to a property [class .....coliumn명] of primitive type setter of ....; nested exception is org.hibernate.PropertyAccessException: Null value was assigned to a property [class ....coliumn명] of primitive type setter of .....coliumn명
db : mysql
char type의 column에 null값의 data가 존재한다고 오류 발생
null 혹은 \u0000 두 경우 모두 오류 발생.
type 변경 : char -> varchar
으로 해결.
-----------------------------------------------------------------------------------------------------------------------------------
신규 column의 type을 char로 생성했다.
null 대신 '\u0000' 으로 값을 세팅하여 사용하면 된다는 글이 있어 처음엔 성공 !!
select, insert, update 모두 문제 없었다.
개발계에서 테스트까지 완료 !!
하지만...
운영 배포 전 다시 한번 개발계에서 테스트할 때 select에서 이미 저 오류 발생.
추가한 column에는 null 값을 사용해야 하므로 type 변경으로 해결하기로 한다.