diff --git a/model_map.go b/model_map.go index 814d636e6..99a5192a3 100644 --- a/model_map.go +++ b/model_map.go @@ -82,7 +82,11 @@ func (m *mapModel) Scan(src interface{}) error { return m.scanRaw(src) case reflect.Slice: if scanType.Elem().Kind() == reflect.Uint8 { - return m.scanRaw(src) + srcB := src.([]byte) + src2 := make([]byte, len(srcB)) + copy(src2, srcB) + + return m.scanRaw(src2) } }