[ 
http://issues.apache.org/jira/browse/IBATIS-297?page=comments#action_12413312 ] 

adamb commented on IBATIS-297:
------------------------------

Unfortunately, the number of clauses is dynamic, so the suggested solution 
won't work.  Our current solution is to insert the parameter string into the 
query ourselves, but this means that we get a large performance loss by not 
having parameterised queries, so the DB has to re-prepare each query.

As to the remapping being nested, I was expecting that the $$ remapping only 
happened once, but the ## remapping happened after the $$ remapping (i.e. no 
infinite recursion possible).

> iBATIS doesn't remap sql fully
> ------------------------------
>
>          Key: IBATIS-297
>          URL: http://issues.apache.org/jira/browse/IBATIS-297
>      Project: iBatis for Java
>         Type: Bug

>   Components: SQL Maps
>     Versions: 2.1.5
>     Reporter: adamb

>
> iBATIS doesn't remap parameters.
> If I have statement with remapResults="true":
> select * from mytable where $dynamicWhereClause$
> and pass in the following two parameters: 
> dynamicWhereClause                              #key#='abc'
> key                                                                 
> java.lang.String="abc"
> Then the remap puts the #key# in the sql directly, rather than rechecking the 
> statement to determine what the parameters will be, so gives the error
> message:
> java.sql.SQLException: ORA-00911: invalid character 
> because it hasn't recognised the new hash parameters.
> Version tested on:
> iBATIS 2.1.5

-- 
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
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to