ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hariharan, Vadivelu \(IE10\)" <Hariharan.Vadiv...@honeywell.com>
Subject RE: Special char in column field
Date Fri, 22 Sep 2006 04:31:05 GMT
Wow that really helped, thanks a ton Clinton, appreciate your help

 

I was cursing ibatis for this :-)

 

 

 

Here is the correct SqlMap for other folks, notice that I have changed PVPO#
to PVPO##

 

 

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-2.dtd" >

<sqlMap namespace="APIYLIBR_APIPPVRS" >

  <resultMap id="abatorgenerated_AS400InvoiceTriggerResultResult"
class="com.honeywell.aes.beta1.apiylibr.AS400InvoiceTriggerResult" >

    <!--

      WARNING - This element is automatically generated by Abator for
iBATIS, do not modify.

      This element was generated on Thu Sep 14 09:42:05 GMT+05:30 2006.

    -->

    <result column="PVTRNK" property="pvtrnk" jdbcType="NUMERIC" />

    <result column="PVCNUM" property="pvcnum" jdbcType="CHAR" />

    <result column="PVPFND" property="pvpfnd" jdbcType="CHAR" />

    <result column="PVPERR" property="pvperr" jdbcType="CHAR" />

    <result column="PVINVD" property="pvinvd" jdbcType="NUMERIC" />

    <result column="PVPO#" property="pvpo" jdbcType="CHAR" />

  </resultMap>

 

 

  <resultMap
class="com.honeywell.aes.beta1.apiylibr.AS400InvoiceTriggerResult"
id="AS400InvoiceTriggerResultResult">

            <result property="pvtrnk"/>

            <result property="pvcnum"/>

            <result property="pvpfnd"/>

            <result property="pvperr"/>

            <result property="pvinvd"/>

            <result property="pvpo"/>

  </resultMap>

 

 

  <select id="getAS400InvoiceTriggerResultResult"
resultMap="AS400InvoiceTriggerResultResult" parameterClass="java.lang.Long"
>

    select DISTINCT PVTRNK, PVCNUM, PVPFND, PVPERR, PVINVD,  PVPO##

    from APIYLIBR.APIPPVRS

            WHERE PVTRNK = #triggerId#

  </select>

</sqlMap>

 

  _____  

From: Clinton Begin [mailto:clinton.begin@gmail.com] 
Sent: Friday, September 22, 2006 9:50 AM
To: user-java@ibatis.apache.org
Subject: Re: Special char in column field

 


Double it up to escape it.  

PVPO##

Cheers,
Clinton

On 9/21/06, Hariharan, Vadivelu (IE10) <Hariharan.Vadivelu@honeywell.com>
wrote:

Hi, 

 

I have a situation where is the column has a special character, "PVPO#"

 

I'm getting an exception when Spring loads my Ibatis files, is there any
workaround for this issue

 

 

Error "Incorrect inline parameter map format"

 

<sqlMap namespace="APIYLIBR_APIPPVRS" >

  <resultMap id="abatorgenerated_AS400InvoiceTriggerResultResult"
class="com.honeywell.aes.beta1.apiylibr.AS400InvoiceTriggerResult" >

    <!--

      WARNING - This element is automatically generated by Abator for
iBATIS, do not modify.

      This element was generated on Thu Sep 14 09:42:05 GMT+05:30 2006.

    -->

    <result column="PVTRNK" property="pvtrnk" jdbcType="NUMERIC" />

    <result column="PVCNUM" property="pvcnum" jdbcType="CHAR" />

    <result column="PVPFND" property="pvpfnd" jdbcType="CHAR" />

    <result column="PVPERR" property="pvperr" jdbcType="CHAR" />

    <result column="PVINVD" property="pvinvd" jdbcType="NUMERIC" />

    <result column="PVPO#" property="pvpo" jdbcType="CHAR" />

  </resultMap>

 

 

  <resultMap
class="com.honeywell.aes.beta1.apiylibr.AS400InvoiceTriggerResult"
id="AS400InvoiceTriggerResultResult">

            <result property="pvtrnk"/>

            <result property="pvcnum"/>

            <result property="pvpfnd"/>

            <result property="pvperr"/>

            <result property="pvinvd"/>

            <result property="pvpo"/>

  </resultMap>

 

 

  <select id="getAS400InvoiceTriggerResultResult"
resultMap="AS400InvoiceTriggerResultResult" parameterClass="java.lang.Long"
>

    select DISTINCT PVTRNK, PVCNUM, PVPFND, PVPERR, PVINVD,  PVPO#

    from APIYLIBR.APIPPVRS

            WHERE PVTRNK = #triggerId#

  </select>

</sqlMap>

 

Thx.

-Hari




 


Mime
View raw message