Hi, I'm bringing this topic UP cause IMHO I've found some more arguments why iBatis users may need to have multiple statements executed in one statement tag.
1. Sometimes we have some fields (simplest example = default values, or some calculated values) set at the database side, so after an INSERT statement we need to retrieve default/calculated values just like we retrieve Autonumber or sequence values. OK, one can 'select' in next statement (what I curently do)... 2. To my taste, I prefer to issue "select 0 from tablename for update nowait" PRIOR to update/delete statement in oracle to make sure web-request will not wait for indefinite time but just report that someone is editing the record (again, I have to issue two statements for update = nowait+actual update) and combine them in CODE - would prefer to combine in SQLMap 3. (Inspired by the thread discussing temporary tables and requests for sql verification) Well, seems soon we'll have tools verifing our statements against the database (unit tests?). Hmm, if I 'select' from temp table I need to test that select statement is executed only after the creation of temporary table... So, do we need multiple Statement contained in a single Statement tag? Certainly we'll survive without :) Wondering what you think, folks
