ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Pitts" <Daniel.Pi...@cnet.com>
Subject Problem with dynamic query.
Date Wed, 22 Mar 2006 01:44:24 GMT
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>

Mime
View raw message