ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ingmar Lötzsch <iloetz...@asci-systemhaus.de>
Subject Re: Parsing Error for "<="
Date Mon, 16 Mar 2009 09:17:13 GMT
Kengkaj Sathianpantarit schrieb:
> Hm, you still need to use CDATA anyway.
> AND EXPECTED_DAY  <![CDATA[ >= ]]> ACTUAL_DAYS

I don't believe. The following example works in our application:

<?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="auftrag">

	<select id="selectByZeitraum" parameterClass="map" resultMap="result">
		SELECT
		<include refid="auftrag.selectFragment"/>
		FROM auftrag AS au
		WHERE #bis:DATE# >= au.beginn
			AND au.ende >= #von:DATE#
		ORDER BY au.beginn, au.ende, au.bezeichnung
	</select>
</sqlMap>

Maybe that depends on the version of iBATIS or another component. We are 
using

- PostgreSQL 8.1.3
- postgresql-8.1-404.jdbc3.jar
- ibatis-2.3.4.726.jar
- Java 1.5.0_11

Ingmar

> Kengkaj
> 
> On Mon, Mar 16, 2009 at 3:56 PM, Ingmar Lötzsch 
> <iloetzsch@asci-systemhaus.de <mailto:iloetzsch@asci-systemhaus.de>> wrote:
> 
>     I prefere to change the order of the operands, because then is no
>     need to use CDATA sections or XML entities.
> 
>     AND EXPECTED_DAY >= ACTUAL_DAYS
> 
>     Kengkaj Sathianpantarit schrieb:
> 
>         Don't forget that you are using XML, use CDATA as follows.
>         <![CDATA[ <= ]]>
> 
>         Kengkaj
> 
>         On Mon, Mar 16, 2009 at 7:38 AM, Tokajac <imre_tokai@hotmail.com
>         <mailto:imre_tokai@hotmail.com> <mailto:imre_tokai@hotmail.com
>         <mailto:imre_tokai@hotmail.com>>> wrote:
> 
> 
>            Hello!
> 
> 
>            I have a tricky error: in the query last row is AND
>         ACTUAL_DAYS <=
>            EXPECTED_DAY. For some reason iBatis doesn't want to parse
>         "<=" (??).
>            Exception: "only well-formed..."
> 
>            How to solve/work-around this?


Mime
View raw message