add json tags to schema.Field

This commit is contained in:
bukowa 2021-04-25 23:44:54 +02:00
parent 370ddcbdf1
commit d3a70e91eb
2 changed files with 7 additions and 8 deletions

View File

@ -64,12 +64,12 @@ type Field struct {
StructField reflect.StructField StructField reflect.StructField
Tag reflect.StructTag Tag reflect.StructTag
TagSettings map[string]string TagSettings map[string]string
Schema *Schema Schema *Schema `json:"-"`
EmbeddedSchema *Schema EmbeddedSchema *Schema `json:"-"`
OwnerSchema *Schema OwnerSchema *Schema `json:"-"`
ReflectValueOf func(reflect.Value) reflect.Value ReflectValueOf func(reflect.Value) reflect.Value `json:"-"`
ValueOf func(reflect.Value) (value interface{}, zero bool) ValueOf func(reflect.Value) (value interface{}, zero bool) `json:"-"`
Set func(reflect.Value, interface{}) error Set func(reflect.Value, interface{}) error `json:"-"`
IgnoreMigration bool IgnoreMigration bool
} }

View File

@ -299,7 +299,6 @@ func TestEmbeddedStructForCustomizedNamingStrategy(t *testing.T) {
} }
} }
func TestSchemaParseMarshalJson(t *testing.T) { func TestSchemaParseMarshalJson(t *testing.T) {
type model struct { type model struct {
gorm.Model gorm.Model