Fallback to gorm.Model at TestAssociationNotNullClear()
This commit is contained in:
parent
afac9e27a7
commit
991d6163d9
@ -3,6 +3,7 @@ package tests_test
|
|||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"gorm.io/gorm"
|
||||||
. "gorm.io/gorm/utils/tests"
|
. "gorm.io/gorm/utils/tests"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -34,13 +35,13 @@ func TestInvalidAssociation(t *testing.T) {
|
|||||||
|
|
||||||
func TestAssociationNotNullClear(t *testing.T) {
|
func TestAssociationNotNullClear(t *testing.T) {
|
||||||
type Profile struct {
|
type Profile struct {
|
||||||
ID uint
|
gorm.Model
|
||||||
Number string
|
Number string
|
||||||
MemberID uint `gorm:"not null"`
|
MemberID uint `gorm:"not null"`
|
||||||
}
|
}
|
||||||
|
|
||||||
type Member struct {
|
type Member struct {
|
||||||
ID uint
|
gorm.Model
|
||||||
Profiles []Profile
|
Profiles []Profile
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user