ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amad Fida <amadf...@yahoo.com>
Subject HashMap's List entry for <iterate>
Date Wed, 08 Mar 2006 11:35:21 GMT
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. 
Mime
View raw message