Skip to content

Commit

Permalink
test: fix TestEmbeddedRelations
Browse files Browse the repository at this point in the history
  • Loading branch information
a631807682 committed Oct 13, 2023
1 parent e57e5d8 commit f25436c
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/embedded_struct_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit f25436c

Please sign in to comment.