ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Cai" <peterca...@yahoo.com.cn>
Subject fill SQL string variable without single quotes
Date Wed, 02 Mar 2005 21:58:58 GMT

I used this mapping to get the schema information for a table:

    <parameterMap id="select-field-para" class="fieldParameter">
      <parameter property="table" />
      <parameter property="schema" />

    <statement id="getFieldList" parameterMap="select-field-para">
      show columns from ? from ?

when I set table="product" schema="jpetstore" in fieldParameter class (both 
schema and table are java String type). I really want a sql statement like 

    " show columns from product from jpetstore "

But iBATIS will generate a statement like this:

    " show columns from 'product' from 'jpetstore' "

So MySQL database always complaint an error.

How to fix it?

Thank you very much!


View raw message