반응형

ibatis 3

ibatis

원문 : http://narrowway.tistory.com/79 실무에서 SQL문을 작성하다 보면 동적인 쿼리문 작성을 작성해야 할 때가 많이 있다.이때 지겹게 if~else if 문을 통해 아주 지저분한 소스 코드를 생성할 때가 왕왕 있게 마련이다.이때 ibatis에서는 아주 깔금하게 구현할 수 있는 방법을 제공해 준다. select * from account (acc_first_name = #firstName# acc_last_name = #lastName# ) acc_email like #emailAddress# acc_id = #id# order by acc_last_name 상황에 의존적인 위 동적 statement로 부터 각각 다른 16가지의 SQL문이 생성될 수 있다. if-else구조와 ..

Programing 2016.12.07

ibatis iterate UncategorizedSQLException

- 알림 블로그의 모든 이미지는 별도의 표기가 되지 않는 한 구글이미지를 사용합니다 편의상 반말체를 사용하기도 합니다 배열을 파라메터로 받아서 처리할 경우가 생겨서 사용을 하려고 했는데 오류가 발생. org.springframework.jdbc.UncategorizedSQLException: SqlMapClient operation; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; --- The error occurred in hsmall/biz/event/EventMstDao.xml. --- The error occurred while preparing the mapped statement for execution. --..

Programing 2014.10.01
반응형