hi,we ran into a max open cursor problem on oracle when doing batch inserts (using two different statements) within one sqlsession/transaction.the code did something like this:for (int i=0; i < large-nuber; i++) {batchMapper1.doInsert();batchMapper2.doAnotherInsert();}it turned out that the problem is related with the BatchExecutor as it only remembers "currentSql" and "currentStatement":if (sql.equals(currentSql) && ms.equals(currentStatement)) {
// use existing statement} else {// create new statement}according to this two "new" statement were created per loop, because the currentSql/currentStatement did always change -> which lead to the to many open cursor error...we got arround this using two loops:for (int i=0; i < large-nuber; i++) {batchMapper1.doInsert();}for (int i=0; i < large-nuber; i++) {batchMapper2.doAnotherInsert();}however I dont see why the BatchExecutor cannot remember more than on sql statement -> imo it could just have List<String> currentSqls and List<Statement> currentStatements.What do you think - do I miss something here?BTW. we are currently using mybatis 3.1.1ty,daniel--
You received this message because you are subscribed to the Google Groups "mybatis-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mybatis-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.