Skip to content

Commit

Permalink
fix session_find & session_get getCacher param error
Browse files Browse the repository at this point in the history
* fix session_delete getCacher tablename param error

* fix session_find & session_get getCacher  param error
  • Loading branch information
xormplus committed Nov 5, 2018
1 parent 9c069d6 commit 4fd8a98
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion session_find.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func (session *Session) find(rowsSlicePtr interface{}, condiBean ...interface{})
}

if session.canCache() {
if cacher := session.engine.getCacher(table.Name); cacher != nil &&
if cacher := session.engine.getCacher(session.statement.TableName()); cacher != nil &&
!session.statement.IsDistinct &&
!session.statement.unscoped {
err = session.cacheFind(sliceElementType, sqlStr, rowsSlicePtr, args...)
Expand Down
2 changes: 1 addition & 1 deletion session_get.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (session *Session) get(bean interface{}) (bool, error) {
table := session.statement.RefTable

if session.canCache() && beanValue.Elem().Kind() == reflect.Struct {
if cacher := session.engine.getCacher(table.Name); cacher != nil &&
if cacher := session.engine.getCacher(session.statement.TableName()); cacher != nil &&
!session.statement.unscoped {
has, err := session.cacheGet(bean, sqlStr, args...)
if err != ErrCacheFailed {
Expand Down
2 changes: 1 addition & 1 deletion xorm.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (

const (
// Version show the xorm's version
Version string = "0.7.0.1028"
Version string = "0.7.0.1103"
)

func regDrvsNDialects() bool {
Expand Down

0 comments on commit 4fd8a98

Please sign in to comment.