test: fix TestEmbeddedRelations (#6639)

This commit is contained in:
Cr 2023-10-26 11:58:13 +08:00 committed by GitHub
parent 78e905919f
commit 5adc0ce5f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -236,8 +236,15 @@ func TestEmbeddedScanValuer(t *testing.T) {
} }
func TestEmbeddedRelations(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 { type AdvancedUser struct {
User `gorm:"embedded"` EmbUser `gorm:"embedded"`
Advanced bool Advanced bool
} }