seratch/scalikejdbc — Issue #1: Cannot use autoCommit session after using readOnly session with the same connection
Author: seratch
Created: 2012-02-21 07:52:18+00:00
State: open

Cannot use autoCommit session after using readOnly session with the same connection.

The following code throws `java.sql.SQLException: invalid transaction state: read-only SQL-transaction`.

```scala
val db = new DB(ConnectionPool.borrow())
val name = (db readOnly { _.asOne("select name from " + tableName + " where id = ?", 1)(_.string("name")) }).get
val count = db autoCommit { _.update("update " + tableName + " set name = ? where id = ?", "foo", 1) }
```