From a739b0223e35add838ba7692a314c86c12d9fa5f Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 6 Aug 2024 13:43:45 +0800 Subject: [PATCH] 1 --- dataset.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dataset.go b/dataset.go index cd3b9ec..61a05d4 100644 --- a/dataset.go +++ b/dataset.go @@ -197,7 +197,7 @@ func UnmarshalModel[T any](ds *DataSet, m *T) error { } fieldVal := ds.GetByName(gormFieldName) if gormIsJson { - q5.DecodeJson(fieldVal, mVal.Field(i)) + q5.DecodeJson(fieldVal, mVal.Field(i).Addr().Interface()) } else { switch field.Type.Kind() { case reflect.Bool: