Hey Brandon, Thanks for fixing this bug. I checked out a copy of ibatis from SVN and tested with $[]$. It now takes literal values! Awesome!
Thanks again! Sam -----Original Message----- From: Brandon Goodin [mailto:[EMAIL PROTECTED] Sent: Monday, April 18, 2005 3:35 PM To: ibatis-user-java@incubator.apache.org; Abeyratne, Sam Subject: Re: Is there a way to remove the quotation marks that ibatis inserts when using #[]# on the <iterate> tag? sorry, this appears to be a bug. Please file a JIRA report for this. Brandon On 4/18/05, Abeyratne, Sam <[EMAIL PROTECTED]> wrote: > Hi Brandon! > > My bad! Sorry about that. I did try the $[]$ > > I am getting a different error I used to see sometime ago due to the > syntax I was using. > > Basically, I get the error: There is no READABLE property named '' in > class 'java.util.ArrayList' > > But like #[]#, I would have expected $[]$ to read the list I am passing. > Does this mean I can't use a List Array when using $[]$? What kind of > test did you do to get it to work? Did you pass a list array as well? > > At least in my work, this will be an issue. > > 2005-04-18 13:34:24,638 [HttpRequestHandler-821] DEBUG > pmt.InterfaceService.class - < viewTimeline > > 2005-04-18 13:34:24,638 [HttpRequestHandler-821] DEBUG > pmt.InterfaceService.class - > viewInterfaceBacklogs > > 2005-04-18 13:34:24,638 [HttpRequestHandler-821] DEBUG pmt.BaseDAO.class > - Both connections active - attemption dual query > > 2005-04-18 13:34:24,698 [HttpRequestHandler-821] ERROR > pmt.actions.PMTDispatchAction.class - Entered catch block - verifyLogin: > There is no READABLE property named '' in class 'java.util.ArrayList' > > THANK YOU AGAIN FOR ALL YOUR HELP!! > Sam > > -----Original Message----- > From: Brandon Goodin [mailto:[EMAIL PROTECTED] > Sent: Monday, April 18, 2005 1:01 PM > To: Abeyratne, Sam > Subject: Re: Is there a way to remove the quotation marks that ibatis > inserts when using #[]# on the <iterate> tag? > > why are you using a question mark? You should be using the dollar sign > ($...$) syntax if you want the literals value without quotes. > > BAD: ?[]? > GOOD: $[]$ > > Brandon > > On 4/18/05, Abeyratne, Sam <[EMAIL PROTECTED]> wrote: > > Hey Brandon, > > > > I downloaded your latest build and tried using ?[]? While passing a > > ListArray, but I am getting the following error: > > > > Cause: java.sql.SQLException: ORA-01729: database link name expected > > > > Any ideas? > > Thanks! > > Sam > > > > <select id="queryInterfaceBacklogs_DUAL" > parameterClass="java.util.List" > > resultMap="interface_backlog_result" > > cacheModel="interface_backlog_cache"> > > select > > interface_name as SYSTEM_NAME, > > sum(backlog_val) as BACKLOG_VAL, > > sum(backlog_last1) as BACKLOG_LAST1, > > sum(backlog_last2) as BACKLOG_LAST2, > > sum(backlog_last3) as BACKLOG_LAST3 > > from > > ( > > <iterate open="(" close=")" conjunction="UNION ALL"> > > select > > a.interface_name, > > sum(decode(i.BACKLOG_VAL,'',0,i.BACKLOG_VAL)) as BACKLOG_VAL, > > sum(decode(i.BACKLOG_LAST1,'',0,i.BACKLOG_LAST1)) as > > BACKLOG_LAST1, > > sum(decode(i.BACKLOG_LAST2,'',0,i.BACKLOG_LAST2)) as > > BACKLOG_LAST2, > > sum(decode(i.BACKLOG_LAST3,'',0,i.BACKLOG_LAST3)) as > > BACKLOG_LAST3 > > from INTERFACE_STATUS i, > > ( select distinct interface_name > > from [EMAIL PROTECTED] > > where category='Provisioning' > > )a > > where SYSTEM_NAME is not null > > and a.interface_name = i.system_name > > group by a.interface_name > > </iterate> > > ) > > group by interface_name > > </select> > > > > from INTERFACE_STATUS i, ( select distinct interface_name > > from [EMAIL PROTECTED] where category='Provisioning' > > )a where SYSTEM_NAME is not null and a.interface_name > = > > i.system_name group by a.interface_name ) ) > > group by interface_name > > > > 2005-04-18 11:23:26,118 [HttpRequestHandler-74] DEBUG > > java.sql.PreparedStatement - {pstm-100007} Parameters: [] > > > > 2005-04-18 11:23:26,118 [HttpRequestHandler-74] DEBUG > > java.sql.PreparedStatement - {pstm-100007} Types: [] > > > > 2005-04-18 11:23:26,769 [HttpRequestHandler-74] DEBUG > > com.ibatis.common.jdbc.SimpleDataSource - Returned connection 169 to > > pool. > > > > 2005-04-18 11:23:26,779 [HttpRequestHandler-74] ERROR > pmt.BaseDAO.class > > - Exception caught in performDualQuery > > > > com.ibatis.common.jdbc.exception.NestedSQLException: > > --- The error occurred while applying a parameter map. > > --- Check the queryInterfaceBacklogs_DUAL-InlineParameterMap. > > --- Check the statement (query failed). > > --- Cause: java.sql.SQLException: ORA-01729: database link name > expected > > > > Caused by: java.sql.SQLException: ORA-01729: database link name > expected > > at > > > com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQuery > > WithCallback(GeneralStatement.java:180) > > > > > > -----Original Message----- > > From: Brandon Goodin [mailto:[EMAIL PROTECTED] > > Sent: Monday, April 18, 2005 10:16 AM > > To: ibatis-user-java@incubator.apache.org > > Subject: Re: Is there a way to remove the quotation marks that ibatis > > inserts when using #[]# on the <iterate> tag? > > > > Sam, > > > > $[]$ should work. I tested it this weekend and it worked fine. > > > > Brandon > > > > On 4/18/05, Abeyratne, Sam <[EMAIL PROTECTED]> wrote: > > > Hi Brice, > > > > > > That does not work. Simply because I am passing a list array. And > for > > a > > > List the ibatis syntax is #[]#. I tried doing something like #?[]?# > > but > > > that does not work. > > > > > > Thanks! > > > Sam > > > > > > -----Original Message----- > > > From: Brice Ruth [mailto:[EMAIL PROTECTED] > > > Sent: Friday, April 15, 2005 6:32 PM > > > To: ibatis-user-java@incubator.apache.org > > > Subject: Re: Is there a way to remove the quotation marks that > ibatis > > > inserts when using #[]# on the <iterate> tag? > > > > > > use $ in place of the #, that way it won't be quoted. > > > > > > On 4/15/05, Abeyratne, Sam <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > > I want to use the <iterate> tag to create an sql statement. > > > > > > > > > > > > > > > > If I have something like [EMAIL PROTECTED] and the first value in > the > > > list for > > > > example is database1, it really translates to > > table_name@'database1'. > > > This > > > > fails because of the single quotes. Is there a way to remove these > > > single > > > > quotes? Meaning, translate [EMAIL PROTECTED] to [EMAIL PROTECTED] > > > > > > > > > > > > > > > > Any assiatnce would be much appreciated! > > > > > > > > Thanks! > > > > > > > > Sam > > > > > > -- > > > Brice Ruth > > > Software Engineer, Madison WI > > > > > > > > > > > >