ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <steven...@gmail.com>
Subject Problem about dynamic query
Date Wed, 25 Jan 2006 13:14:36 GMT
Dear all,

I use following for dynamic query in two connection enviroment, JNDI
connection and SIMPLE connection.
But in SIMPLE connection is working, and JNDI always return 0 records even
database has data.

But in JNDI enviroment, if I only set one condition, it's working, why?

PLease tell me what's wrong with it?

Following is the sql map XML file, thanks for your warm-hearted help:

 <select id="getPersonInfo" parameterClass="com.istc.cto.po.PersoninfoPO"
  select * from cto.personinfovo
      <dynamic prepend="WHERE">
        <isNotNull prepend="AND" property="id">
              <![CDATA[ (id=#id#) ]]>
        <isNotNull prepend="AND" property="name">
               <![CDATA[  (name=#name#) ]]>
        <isNotNull prepend="AND" property="area">
               <![CDATA[  (area=#area#) ]]>

Thanks and Best Regards

View raw message