That's the one. Rather than enhancements to the decision tags individually I would like to see some proposals implemented gathered on the wiki 'Improved Dynamic SQL Whiteboard'...
Any comments from the iBATIS committers about this? Thanks, Niels -----Original Message----- From: Reuben Firmin [mailto:[EMAIL PROTECTED] Sent: woensdag 22 maart 2006 18:37 To: [email protected] Subject: Re: Problem with dynamic query. 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> > >
