Hello -
Is anyone having luck using the latest version of iBatis and the
<iterate> dynamic SQL tag? What was working fine in a previous version
(1.2.1) no longer does. What used to work:
<!-- CustomerSearchData.AccountData returns a collection of Account
objects, each having an AccountId property -->
<select id="SelectCustomersByAccountIds"
parameterClass="Sample.Test.NameSpace.CustomerSearchData"
resultMap="CustomerResultMap">
select C.ACCOUNT_ID
C.FIRST_NM
C.LAST_NM
from CUSTOMER C
where C.ID in
<iterate property="AccountData" open="(" close=")"
conjunction="," >
#AccountData[].AccountId#
</iterate>
</select>
Now throws this exception:
ProbeException: "Error getting ordinal value from .net object.
CauseInput string was not in a correct format."
I'm looking through the source code and it appears the whole process of
applying a parameter map has changed from 1.2.1 to 1.5 beta. The
ObjectProbe object is trying to parse an index value that is not present
in the string "AccountData[].AccountId". Should there really be an
index between the "[]"?
Thanks,
Brian Chick
Information Systems - Software Development
Quad/Graphics
www.QG.com