ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brice Ruth <bdr...@gmail.com>
Subject Re: Are there any ways to view the SQL mapping statements?
Date Thu, 16 Dec 2004 20:50:05 GMT
You'll need to use $campusCode$ to use the literal value, otherwise
iBATIS will quote the string, which won't work. This doesn't directly
answer your question, but it should solve your problem :)

To answer your question, yes, you can use log4j to view the SQL
statements that are sent to the database. The iBATIS documentation
contains information on how to set this up, and of course the log4j
website and the commons-logging documentation (which is what iBATIS
uses) will be your friends.

I've also heard a product called P6spy mentioned which does this at
the JDBC driver level, if I'm not mistaken. I don't have any
experience with it, tho.


On Thu, 16 Dec 2004 14:25:08 -0500, Lucy Fang <fang@acs.rutgers.edu> wrote:
> Hi, 
> Are there any ways I can view the SQL mapping statements after created a
> dynamic SQL statement and passed all of parameters to it? 
> I have a dynamic SQL mapping statement with 
>         select * from campus where campuscode in #campusCode# 
> if I use campuscode in (03,04), it works good. But if I use the parameter
> campusCode replace the value, it doesn't work. I pretty sure the parameter
> value is "(03,04)". 
> The database I am using is Oracle and iBatis is SQL Map 2.0. 
> Thanks. 
> Lucy

View raw message