From f1073147dc73d01dcf8a6ee9252d354ff06a1062 Mon Sep 17 00:00:00 2001 From: j2gg0s Date: Sun, 5 Jan 2025 19:42:09 +0800 Subject: [PATCH] fix: get m2m table's structKey with driver.Valuer Close #1100 --- model_table_m2m.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model_table_m2m.go b/model_table_m2m.go index 14d385e62..df072fbdf 100644 --- a/model_table_m2m.go +++ b/model_table_m2m.go @@ -103,7 +103,7 @@ func (m *m2mModel) scanM2MColumn(column string, src interface{}) error { if err := field.Scan(dest, src); err != nil { return err } - m.structKey = append(m.structKey, dest.Interface()) + m.structKey = append(m.structKey, indirectFieldValue(dest)) break } }