You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Amad Fida <am...@yahoo.com> on 2006/03/08 12:35:21 UTC
HashMap's List entry for
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 will 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.