Field name with # not supported without parameters
--------------------------------------------------

                 Key: IBATIS-558
                 URL: https://issues.apache.org/jira/browse/IBATIS-558
             Project: iBatis for Java
          Issue Type: Bug
    Affects Versions: 2.3.0
         Environment: iOS v5r3
            Reporter: M.H. Avegaart


Assume I have a field named FIELD#. To use this field in SQL I need to 
duplicate the # character (as mentioned in the iBatis FAQ).

The following statement works:
<select id="..." parameterClass="..." resultMap="...">
        select FIELD##
        from SCHEMA.TABLE
        where OTHER_FIELD = #value#
</select>

But to my surprise, this one doesn't:
<select id="..." parameterMap="..." resultMap="...">
        select FIELD##
        from SCHEMA.TABLE
        where OTHER_FIELD = ?
</select>
(DB2 complains that FIELD## can't be found in SCHEMA.TABLE)

Apparently the ## is only replaced by # if the SQL string also contains at 
least one #parameter#.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to