ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jean-Francois Poilpret" <jfpoilp...@hcm.vnn.vn>
Subject RE: question on dynamic query. Thanks for help.
Date Sat, 15 Apr 2006 01:12:02 GMT

Remove the <![CDATA[ and ]]> tags, they prevent iBATIS from parsing the
<dynamic> tags.

As a general rule of thumb, I would advise to use <![CDATA[ only when needed
(ie, when you need to do a greater/lower than comparison in your statement),
and I would also restrict its use just around the problematic characters
(although it does not make it very readable).

Another option to use "<" ">" is to use "&lt;" "&gt;" (not much readable
either but I find it better than <![CDATA[).



-----Original Message-----
From: Lihui Pang [mailto:lihui_pang@yahoo.com] 
Sent: Saturday, April 15, 2006 8:04 AM
To: user-java@ibatis.apache.org
Subject: question on dynamic query. Thanks for help.

The following statement always complain bad grammar. I
can't see where it's the problem, neighter can I see
the generated SQL statement. Please help.

 <statement id="getUserProfileList"
	   SELECT  c.First_Name, c.Surname, e.Email_Address  
	   FROM Customer c, Email_Address e

	   where c.user_id = e.user_id

         <isNotNull prepend="AND" property="userName">
$accountNameOperator$ #userName#

	   ORDER BY  $sortColumn$  $sortDirection$  

yihuayishijie yishuyichunqiu

Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

View raw message