ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Legler, Steffen" <Steffen.Leg...@rossmann.de>
Subject Problem with inlineParameterMap using DB2-Database
Date Mon, 06 Jun 2005 14:27:44 GMT


I am using iBATIS for mapping java objects to a DB2 database and a

My sqlMap looks like this:

<sqlMap namespace="namespace1">

	<typeAlias alias="vo" type="org.company.PropertyType_VO"/>

	<resultMap id="map" class="vo">
		<result property="instanceId" column="instance"/>
		<result property="value" column="column1"/> 

	<sql id="where">
		where instance=#instanceId#

	<select id="select" resultMap="map" resultClass="vo"
		select #instanceId# as instance, column1 from schema.table1
<include refid="where"/>

The sqlmap generates an sql-statement which should look like this.

	Select 12345 as instance, column1 from schema.table1 where

Using the PostgreSQL-Database the mapping is OK an i get the right data from
the database.

Using the DB2-database it throws the following exception:

Exception in thread "main"
--- The error occurred in org/company/ibatis/sql/db2/prop1.xml.  
--- The error occurred while applying a parameter map.  
--- Check the namespace1.select-InlineParameterMap.  
--- Check the parameter mapping for the 'instanceId' property.  

Is it not possible in iBATIS and DB2 to use the same inline-Parameter in one

Hope you can help me.


View raw message