Fix issue #894
This commit is contained in:
parent
fc1b13e0d8
commit
9e1c0ee31d
|
@ -390,7 +390,13 @@ func (session *Session) cacheFind(t reflect.Type, sqlStr string, rowsSlicePtr in
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
bean := cacher.GetBean(tableName, sid)
|
bean := cacher.GetBean(tableName, sid)
|
||||||
if bean == nil || reflect.ValueOf(bean).Elem().Type() != t {
|
|
||||||
|
// fix issue #894
|
||||||
|
ckt := t
|
||||||
|
if ckt.Kind() == reflect.Ptr {
|
||||||
|
ckt = t.Elem()
|
||||||
|
}
|
||||||
|
if bean == nil || reflect.ValueOf(bean).Elem().Type() != ckt {
|
||||||
ides = append(ides, id)
|
ides = append(ides, id)
|
||||||
ididxes[sid] = idx
|
ididxes[sid] = idx
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue