test: fix TestEmbeddedRelations
This commit is contained in:
parent
e57e5d8884
commit
f25436caca
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user