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

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

     [ http://issues.apache.org/jira/browse/IBATIS-65?page=history ]

Clinton Begin updated IBATIS-65:
--------------------------------

        type: Wish  (was: Bug)
    Priority: Minor  (was: Major)

Two things:

1) No, currently expansion of parameters is not supported (for various reasons), which is also why it is not documented as such.

2) The <include> element has nothing to do with what you're trying to do.  It's for including common pieces of SQL that are defined in <sql> elements in the document.

I've left this open, but changed it to a "wish".

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

>
> 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