mirror of https://github.com/go-gorm/gorm.git
test: fix TestEmbeddedRelations (#6639)
This commit is contained in:
parent
78e905919f
commit
5adc0ce5f6
|
@ -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…
Reference in New Issue