You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Rohan Lenard (JIRA)" <ib...@incubator.apache.org> on 2005/02/02 05:01:17 UTC

[jira] Commented: (IBATIS-65) Recursive inclusions don't expand

     [ http://issues.apache.org/jira/browse/IBATIS-65?page=comments#action_58480 ]
     
Rohan Lenard commented on IBATIS-65:
------------------------------------

I notice in 2.0.9 there is now meant to be <include> - but this doesn't conform to the DTD .. how is it meant to be done

> Recursive inclusions don't expand
> ---------------------------------
>
>          Key: IBATIS-65
>          URL: http://issues.apache.org/jira/browse/IBATIS-65
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.9
>     Reporter: Rohan Lenard

>
> Given the documentation doesn't mention this it is hard to know what is correct.
> I have an SQL Map like this 
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE sqlMap
>     PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
>     "http://www.ibatis.com/dtd/sql-map-2.dtd">
> <sqlMap>
>     <select id="getFrequencyTableData" parameterClass="java.util.Map" resultMap="frequency-table-result">
>         SELECT sum(a) as a FROM tablea
>         <dynamic prepend="WHERE">
>                 $externalClause$
>         </dynamic>
>         GROUP BY
>         <isNotNull property="timeChunkClause">
>             begin,
>         </isNotNull>
>             <!-- Note: upperlimit is "strictly" required - but not by MYSQL - for HSQLDB and probably other DBs -->
>             lowerlimit, upperlimit
>     </select>
> </sqlMap>
> Now external clause is passed as a parameter with a value like this .
>                     ( criteria = #criteria_0# )
> What I expected the SQL to end up as is
> SELECT sum(a) as a FROM tablea WHERE criteria = ?
> But it gets expanded as 
> SELECT sum(a) as a FROM tablea WHERE criteria = #criteria_0#
> Shouldn't it be expanded ??

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira