fix DB.withTransaction
Merge pull request #793 from xuwei-k/withTransaction

fix DB.withTransaction