test: fix TestEmbeddedRelations

This commit is contained in:
a631807682 2023-10-13 10:21:55 +08:00
parent e57e5d8884
commit f25436caca
No known key found for this signature in database
GPG Key ID: 137D1D75522168AB

View File

@ -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
}