Browse Source

support get record

xormplus 7 years ago
parent
commit
91de93f0c8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      session_get.go

+ 1 - 1
session_get.go

@@ -96,7 +96,7 @@ func (session *Session) nocacheGet(beanKind reflect.Kind, table *core.Table, bea
 		return true, rows.Scan(&bean)
 		return true, rows.Scan(&bean)
 	case *sql.NullInt64, *sql.NullBool, *sql.NullFloat64, *sql.NullString:
 	case *sql.NullInt64, *sql.NullBool, *sql.NullFloat64, *sql.NullString:
 		return true, rows.Scan(bean)
 		return true, rows.Scan(bean)
-	case *map[string]Value:
+	case *map[string]Value, *Record:
 		vv := reflect.ValueOf(bean)
 		vv := reflect.ValueOf(bean)
 		if vv.Kind() != reflect.Ptr || vv.Elem().Kind() != reflect.Map {
 		if vv.Kind() != reflect.Ptr || vv.Elem().Kind() != reflect.Map {
 			return true, errors.New("dest should be a map's pointer")
 			return true, errors.New("dest should be a map's pointer")