ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Betto McRose Gamarra" <icaru...@gmail.com>
Subject WHERE clause with full parameter condition send
Date Fri, 21 Nov 2008 13:12:19 GMT
hi,

well, I have a problem when I send the whole condition for the WHERE clause

this is the xml config:

    <select id="getSqlResult" resultClass="java.util.Map"
parameterClass="java.util.Map">
        <![CDATA[
            SELECT
                ID,
                $columName$ AS DESCRIPTION

            FROM
                $tableName$
        ]]>
            <dynamic prepend="WHERE">
              <isNotNull prepend="WHERE" property="condition">
                  #condition#
              </isNotNull>
            </dynamic>
    </select>

every property has a value, I could check that

the problem is because I don't have condition= #condition#
and I get this error:
ERROR [STDERR] com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred while applying a parameter map.
--- Check the Ref.getSqlResult-InlineParameterMap.
--- Check the statement (query failed).
--- Cause: java.sql.SQLException: ORA-00920: invalid relational operator



I checked the sql string before calling to sqlExecuteQuery() method in
MappedStatement class
this is the result:

SELECT ID,  DOC_NAME AS DESCRIPTION FROM DOCUMENT WHERE ?

as you can see, the only missing part is the where clause I send

the value in the HashMap is filled, I also check that

what is the solution for this ?

-- 
Betto McRose Gamarra
IcarusDB
"Soluciones Informáticas"
Cel.: +595 992 686947

Mime
View raw message