I have a following select statement,

<select id="getAccounts">
    select * from accounts
            <dynamic prepend="WHERE">
                <iterate open="ACCOUNTS.ID IN (" close=")" conjunction=",">
                    #accountIdList[]#
                </iterate>
            </dynamic>
</select>

My parameter class is HashMap as i createa map like
Map params = new HashMap();
params.put("accountIdList", accountIds);

My assumption is that iBatis will lookup the accountIdList in the map and the returned value, which is a list w ill be used in <dynamic>. But I am gettng this error,

--- Cause: com.ibatis.sqlmap.client.SqlMapException: ParameterObject or property was not a Collection, Array or Iterator.

I can't figure out what I am doing wrong. Any ideas?

Amad


Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.

Reply via email to