Thanks for the quick response... That is an option and how I'm testing it with the trace currently. However, it is a manual step that the developer will have to go back to do and remember to do in the future. Automating it will ensure it is always there.
It should also have a better identifier for easier parsing... /*iBATIS.id:<namespace>.<id>*/ Thoughts? Mike On Feb 6, 2008 3:31 PM, Gilles Bayon <[EMAIL PROTECTED]> wrote: > Why don't you put your comment in the mappping file > > <statement id="DynamicJIRA168" > parameterClass="Query" > resultClass="Account"> > */* DynamicJIRA168*/* > select > Account_ID as Id, > Account_FirstName as FirstName, > Account_LastName as LastName, > Account_Email as EmailAddress > from Accounts > <dynamic prepend="where"> > <isParameterPresent> > <isNotEmpty prepend="and" property="DataObject.Id" > > Account_ID = #DataObject.Id# > </isNotEmpty> > <isNotEmpty prepend="and" property="DataObject.FirstName" > > Account_FirstName = #DataObject.FirstName# > </isNotEmpty> > <isNotEmpty prepend="and" property="DataObject.LastName" > > Account_LastName = #DataObject.LastName# > </isNotEmpty> > </isParameterPresent> > </dynamic> > </statement> > > you will in the trace no ? > 2008/02/06 22:29:45:SSS [DEBUG] > Apache.Ibatis.DataMapper.Model.Statements.PreparedStatementFactory - > Statement Id: [DynamicJIRA168] Prepared SQL: [*/* DynamicJIRA168*/ * > select Account_ID as Id, Account_FirstName as > FirstName, Account_LastName as LastName, Account_Email as > EmailAddress from Accounts where Account_ID = @param0] > > -- > Cheers, > Gilles >

