Re: echo dynamic sql

2008-05-29 Thread Prateek Asthana
Thanks Andre, Can you please point me to teh documentation where its mentioned. I would like to read it and implement it. Thanks Prateek On Wed, May 28, 2008 at 10:06 AM, Andrey Rogov <[EMAIL PROTECTED]> wrote: > usually all use log4j. > you can see and prepare Statement and executing statement

customized where

2008-05-29 Thread Bruno Sanz
Hi We have a customized search form . This allow tro add conditions. We would want to be able to write one customized "where" in the query Is there any way to "send" the where as parameter to the ibatis? We want to create one condition that could have many "OR" and "AND"s in the query (unknown be

Re: echo dynamic sql

2008-05-29 Thread Andrey Rogov
iBatis Developers Guide, 65 page. 2008/5/29 Prateek Asthana <[EMAIL PROTECTED]>: > Thanks Andre, > Can you please point me to teh documentation where its mentioned. I > would like to read it and implement it. > > Thanks > Prateek > > > On Wed, May 28, 2008 at 10:06 AM, Andrey Rogov <[EMAIL PROTE

Re: using a parameterClass and also passing some additional params..

2008-05-29 Thread apinke
apinke wrote: > > Hi , > > I am using a abator generated Insert statement whose parameterClass is a > JavaBean class. > > (psuedo syntax) > parameterClass="org.test.DomainObject" > > insert into MYTABLE.. ..values > (#appName:VARCHAR#,...#callTime:TIMESTAMP#) > > > In addition to th

Re: using a parameterClass and also passing some additional params..

2008-05-29 Thread apinke
Well, what do you know ? I thought of trying the following right after posting...and it worked ! :-) Here is how I got it to work : Iinstead of passing the domain object , I pass a Map that contains it. (psuedo syntax) insert into $schema$.MYTABLE.. ..values (#record.appName:VARCHAR#,..

Re: customized where

2008-05-29 Thread Jeff Butler
Couple of ways to do this: 1. Build the where clause yourself and pass it as a parameter to the statement: Select * from foo $where_clause$ 2. Use iBATIS dynamic SQL tags: select * from foo FIRST_NAME = #firstName# LAST_NAME = #lastName# The first is open to SQL injectio

Inserting lists

2008-05-29 Thread Nicholoz Koka Kiknadze
/* I apologize for re-posting this, but I think my previous post ended in junk folders because I was using all-numeric mailbox */ Recently I found that I'm writing loops to insert lists of objects way too often. I think it makes sense implementing methods like: insertList("insertSingleSomeObject"

Re: Inserting lists

2008-05-29 Thread Richard Yee
Nicholoz, I don't think it is a very common use case to insert a list in a database. QueryForList returns rows from a select query. Typically, there isn't a need to insert several items into the same table at once. What would you do if you have duplicate items? Would you roll back, stop, or c

Re: C3P0 configuration example for iBatis anyone?

2008-05-29 Thread Richard Yee
Anton, If you are using Oracle, have you considered using the oracle.jdbc.pool.OracleConnectionPoolDataSource? -Richard Anton Rothenbacher wrote: Greetings, the short story is that we have tried DBCP and SimpleDatasource with iBatis but had some issues with each, we are connecting to an Or

Re: C3P0 configuration example for iBatis anyone?

2008-05-29 Thread Clinton Begin
>> SimpleDatasource exhibits an issue with pool.pingquery taking roughly 15min before a bad connection is deemed bad and removed from the pool, there seems to be no reaper or evictor thread to test idle connections on a regular basis as opposed to testing at checkout time. << This is not an issue,

Re: Inserting lists

2008-05-29 Thread Nicholoz Koka Kiknadze
Thanks for an opinion Richard Typically, there isn't a need to insert several items into the same table at > once How about shopping cart - most typical application ;) Actually I have applicants with lists of faculties and exams. Every list property of newly created object needs to be inserted,