From 5adc0ce5f6c8cf97f1f6b9e835750406612c2fe0 Mon Sep 17 00:00:00 2001 From: Cr <631807682@qq.com> Date: Thu, 26 Oct 2023 11:58:13 +0800 Subject: [PATCH] test: fix TestEmbeddedRelations (#6639) --- tests/embedded_struct_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/embedded_struct_test.go b/tests/embedded_struct_test.go index 4314f88c..873bba2a 100644 --- a/tests/embedded_struct_test.go +++ b/tests/embedded_struct_test.go @@ -236,8 +236,15 @@ func TestEmbeddedScanValuer(t *testing.T) { } func TestEmbeddedRelations(t *testing.T) { + type EmbUser struct { + gorm.Model + Name string + Age uint + Languages []Language `gorm:"many2many:EmbUserSpeak;"` + } + type AdvancedUser struct { - User `gorm:"embedded"` + EmbUser `gorm:"embedded"` Advanced bool }