Merge pull request #151 from starchou/master

Update session.go
This commit is contained in:
Lunny Xiao 2014-07-31 15:37:26 +08:00
commit 089499e3ad
1 changed files with 3 additions and 0 deletions

View File

@ -983,6 +983,9 @@ func (session *Session) Get(bean interface{}) (bool, error) {
}
// defer stmt.Close() // !nashtsai! don't close due to stmt is cached and bounded to this session
rawRows, err = stmt.Query(args...)
if err != nil {
return false, err
}
} else {
rawRows, err = session.Tx.Query(sqlStr, args...)
}