Can't you evaluate the condition prior to making a call to you map e.g
if(map.get("p_share")!=null)
sqlmap.insert("idInsert",map);
Steve.________________________________ From: KwonNam Son [mailto:[EMAIL PROTECTED] Sent: Thu 27/10/2005 09:27 To: iBatisUser Subject: When there are no statement, iBatis throws an exception. I have some insert statement like the follwoing... <insert id="idInsert" parameterClass="java.util.Map"> <isNotEmpty property="p_share"> INSERT INTO TMLBC060 ( USER_ID, RIGHT_CODE, SERVICE_CODE, SERVICE_SHARE ) VALUES ( #p_user_id#, #p_share_right_code#, #p_share_service_code#, #p_share# ) </isNotEmpty> </insert> When p_share property is empty, IdInsert has no statement in it. This statement runs in a batch. In this condition, iBatis throws an exception. Is there any way of preventing throwing an excetion? Because of some complicated reasons, It's very difficult to check p_share property in Java. Also, I could make an dummy insert statement(like "insert into dummy select 'x' from dual where 1=0;"), but I hope I could avoid that kind solution. Thanks, KwonNam. This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
<<winmail.dat>>
