|
Hi,
I’m using parameterMap as follow for all my sql: <parameterMap
id="userParamMapForName" class="java.util.HashMap">
<parameter property="name" javaType="java.lang.String"
jdbcType="VARCHAR" />
<parameter property="email" javaType="java.lang.String"
jdbcType="VARCHAR"/> </parameterMap> And I want to validate all the keys (name, email, etc.)
sended to iBatis. I want to use like a contract (interface) within the API. I
tried with inline parameters but can’t validate types. Example: SQL: <select
id="UserFindByName" parameterMap =
"userParamMapForName" resultMap="userResultMap"> <![CDATA[
SELECT * FROM DEMO_USER WHERE NAME = ? AND EMAIL = ? ]]> </select> If paramterMap doesn’t contain name and email keys the
select is (I use p6spy to look into): SELECT * FROM DEMO_USER WHERE NOMBRE = '' AND APELLIDO1 =
'' Could any one please help me about it. I need to validate
all the keys passed to iBatis. I want to generate an error if parameterMap does
not contain all the keys. Thanks! Toni.
|
