bug fixed
This commit is contained in:
parent
1992491553
commit
cb75b2cd9c
|
@ -1002,9 +1002,9 @@ func (session *Session) Get(bean interface{}) (bool, error) {
|
||||||
var err error
|
var err error
|
||||||
session.queryPreprocess(&sqlStr, args...)
|
session.queryPreprocess(&sqlStr, args...)
|
||||||
if session.IsAutoCommit {
|
if session.IsAutoCommit {
|
||||||
stmt, err := session.doPrepare(sqlStr)
|
stmt, errPrepare := session.doPrepare(sqlStr)
|
||||||
if err != nil {
|
if errPrepare != nil {
|
||||||
return false, err
|
return false, errPrepare
|
||||||
}
|
}
|
||||||
// defer stmt.Close() // !nashtsai! don't close due to stmt is cached and bounded to this session
|
// defer stmt.Close() // !nashtsai! don't close due to stmt is cached and bounded to this session
|
||||||
rawRows, err = stmt.Query(args...)
|
rawRows, err = stmt.Query(args...)
|
||||||
|
|
Loading…
Reference in New Issue