http://issues.apache.org/jira/browse/IBATIS-238, in case anybody else
wishes to vote on it. :)
Niels Beekman wrote:
You cannot use an iterated property in the decision tags. I believe
there is a JIRA issue for this.
<isNotNull property="contentBeanTrees[].detailsTable"> --> not allowed
Niels
-----Original Message-----
From: Daniel Pitts [mailto:[EMAIL PROTECTED]
Sent: woensdag 22 maart 2006 2:44
To: [email protected]
Subject: Problem with dynamic query.
I'm trying the following dynamic query, and ibatis throws an exception
on initialization. (Even before I call the query) The exception is a
Probe exception, cannot find ordinal for JavaBean , caused by
NumberFormatException from string "".
Can anyone tell me what I'm doing wrong?
Query:
<select id="dynamicQuery" resultClass="java.util.HashMap"
parameterClass="java.util.Map">
<dynamic>
SELECT
<iterate property="properties" conjunction=",">
`$properties[].tableAlias$`.$properties[].sourceColumn$
AS `$properties[].path$`
</iterate>
FROM
<iterate property="contentBeanTrees" conjunction="join">
content AS `$contentBeanTrees[].contentTableAlias$`
<isNotNull property="contentBeanTrees[].detailsTable">
JOIN $contentBeanTrees[].detailsTable$ AS
`$contentBeanTrees[].detailsTableAlias$`
</isNotNull>
</iterate>
<iterate property="constraints" conjunction="AND"
prepend="WHERE">
`$constraints[].tableAlias$`.$constraints[].sourceColumn$=
#constraints[].value#
</iterate>
</dynamic>
</select>