상세 컨텐츠

본문 제목

mybatis Error selecting key or setting result to parameter object

꼬꼬마

by TISTORY 2017. 3. 15. 22:06

본문

parameterType="map" 이고, <selectKey></selectKey>를 쓰고 insert into table values(#{id}, ....) 를 쓰셨나요?
이럴때는 <selectKey> 말고 insert into table values(nextval('seq'), ....) 이렇게 바로 써줘야합니다ㅠㅠ
map이라서 #{id} 라고 했을때 그냥 null로 알아먹는 듯ㅠ
두시간 짜리 삽질 ㅠ

'꼬꼬마' 카테고리의 다른 글

postgresql - lead, lag over  (0) 2017.06.07
Utility classes should not have public constructors  (0) 2017.05.23
sdfsdf  (0) 2017.01.05
https://www.keycdn.com/blog/front-end-frameworks  (0) 2016.12.23
git submodule 끊고 싶을때  (0) 2016.12.15

관련글 더보기