It looks like your dynamic tags are not being processed. Do you have anything surrouned with a CDATA tag?
Brandon On 5/12/05, Sergey Livanov <[EMAIL PROTECTED]> wrote: > Thank you a lot, Brandon. > BG> it should be okay to use dynamic. What version of iBatis are you using? > 2.0.8 > > When I remove <dynamic></dynamic> it does'not work too. > I'd like to ask you to see to Log4j java PreparedStatement:. > The parameters are correct, but > <dynamic><isGreaterThan prepend="and" property="owner" > compareValue="0"></dynamic> > construction has been kept, > and this SQL operator would not work. > > Sergey. > > BG> Brandon > > BG> On 5/12/05, Pedro Emanuel Castro Faria Salgado <[EMAIL PROTECTED]> wrote: > >> On 12/05/2005 15:39, "Sergey Livanov" <[EMAIL PROTECTED]> wrote: > >> > >> > > >> > Could you, please, help me find an error, > >> > very simple statement, but not work.. > >> > > >> > <statement id="getPayorders" resultMap="payorder_result"> > >> > > >> > select d.payorder > >> > from fin.payorders d > >> > where d.partner = #partner# > >> > >> Take off the <dynamic>? > >> > >> Below a working example that I have: > >> > >> SELECT * > >> FROM myTable > >> WHERE condition_clause AND some_other_condition_clause > >> <isNotNull prepend="AND" property="description"> > >> description LIKE #description# > >> </isNotNull> > >> > >> > <dynamic> > >> > <isGreaterThan prepend=" and " property="owner" compareValue="0"> > >> > d.owner = #owner# > >> > </isGreaterThan> > >> > </dynamic> > >> > > >> > </statement> > >> > > >> > without dynamic all works, > >> > Log4J text. > >> > > >> > 2005-05-12 16:26:52,718 INFO main TestIbatis TestIbatis - Executing: > >> > 2005-05-12 16:26:53,703 DEBUG main > >> > com.ibatis.common.jdbc.SimpleDataSource > >> > com.ibatis.common.jdbc.SimpleDataSource - Created connection 8002486. > >> > 2005-05-12 16:26:53,703 DEBUG main java.sql.Connection > >> > com.ibatis.common.jdbc.logging.ConnectionLogProxy - {conn-100000} > >> > Connection > >> > 2005-05-12 16:26:53,765 DEBUG main java.sql.PreparedStatement > >> > com.ibatis.common.jdbc.logging.PreparedStatementLogProxy - {pstm-100001} > >> > PreparedStatement: > >> > select d.payorder from sell.payorders d where d.partner = ? > >> > <dynamic><isGreaterThan prepend=" and " property="owner" > >> > compareValue="0"> d.owner = ? </isGreaterThan></dynamic> > >> > 2005-05-12 16:26:53,765 DEBUG main java.sql.PreparedStatement > >> > com.ibatis.common.jdbc.logging.PreparedStatementLogProxy - {pstm-100001} > >> > Parameters: [1, 15842] > >> > 2005-05-12 16:26:53,765 DEBUG main java.sql.PreparedStatement > >> > com.ibatis.common.jdbc.logging.PreparedStatementLogProxy - {pstm-100001} > >> > Types: [java.lang.Long, java.lang.Long] > >> > 2005-05-12 16:26:53,781 DEBUG main > >> > com.ibatis.common.jdbc.SimpleDataSource > >> > com.ibatis.common.jdbc.SimpleDataSource - Returned connection 8002486 to > >> > pool. > >> > > >> > >> > > -- > С уважением, > Sergey mailto:[EMAIL PROTECTED] > >