From 1fdac0731a555a300fd110b70a317fca737ae315 Mon Sep 17 00:00:00 2001 From: wln32 Date: Mon, 13 Jan 2025 19:22:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E6=8E=89issue4086=E7=9A=84=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../drivers/mysql/mysql_z_unit_issue_test.go | 32 ------------------- 1 file changed, 32 deletions(-) diff --git a/contrib/drivers/mysql/mysql_z_unit_issue_test.go b/contrib/drivers/mysql/mysql_z_unit_issue_test.go index ae5c90a6d97..af4e43b29e1 100644 --- a/contrib/drivers/mysql/mysql_z_unit_issue_test.go +++ b/contrib/drivers/mysql/mysql_z_unit_issue_test.go @@ -1590,35 +1590,3 @@ func issue4034SaveAppDevice(ctx context.Context, table string, tx gdb.TX) error }).Save() return err } - -func Test_issue4086(t *testing.T) { - type ProxyParam struct { - ProxyId int64 `json:"proxyId" orm:"proxy_id" description:""` - RecommendIds []int64 `json:"recommendIds" orm:"recommend_ids" description:""` - Photos []string `json:"photos" orm:"photos" description:""` - } - gtest.C(t, func(t *gtest.T) { - table := "proxy_param" - array := gstr.SplitAndTrim(gtest.DataContent(`issue4086.sql`), ";") - for _, v := range array { - _, err := db.Exec(ctx, v) - t.AssertNil(err) - } - defer dropTable(table) - - var proxyParamList []*ProxyParam - err := db.Model(table).Ctx(context.Background()).Scan(&proxyParamList) - t.AssertNil(err) - t.Assert(len(proxyParamList), 2) - t.Assert(proxyParamList[0], &ProxyParam{ - ProxyId: 1, - RecommendIds: []int64{584, 585}, - Photos: nil, - }) - t.Assert(proxyParamList[1], &ProxyParam{ - ProxyId: 2, - RecommendIds: []int64{}, - Photos: nil, - }) - }) -}