update func (session *Session) cacheFind, if no cache hit, continue instead of return error

This commit is contained in:
Nash Tsai 2014-08-18 16:02:24 +08:00
parent f33ed5b947
commit 8164f74b64
1 changed files with 3 additions and 2 deletions

View File

@ -848,8 +848,9 @@ func (session *Session) cacheFind(t reflect.Type, sqlStr string, rowsSlicePtr in
for j := 0; j < len(temps); j++ { for j := 0; j < len(temps); j++ {
bean := temps[j] bean := temps[j]
if bean == nil { if bean == nil {
session.Engine.LogError("[xorm:cacheFind] cache error:", tableName, ides[j], bean) session.Engine.LogWarn("[xorm:cacheFind] cache no hit:", tableName, ides[j])
return errors.New("cache error") // return errors.New("cache error") // !nashtsai! no need to return error, but continue instead
continue
} }
if sliceValue.Kind() == reflect.Slice { if sliceValue.Kind() == reflect.Slice {
if t.Kind() == reflect.Ptr { if t.Kind() == reflect.Ptr {