Fix
This commit is contained in:
parent
c9f112c113
commit
eb5cd0654f
@ -76,7 +76,7 @@ func updateCallback(scope *Scope) {
|
|||||||
for _, field := range scope.Fields() {
|
for _, field := range scope.Fields() {
|
||||||
if scope.changeableField(field) {
|
if scope.changeableField(field) {
|
||||||
if !field.IsPrimaryKey && field.IsNormal && (!field.IsBlank || field.HasDefaultValue || field.IsForeignKey) {
|
if !field.IsPrimaryKey && field.IsNormal && (!field.IsBlank || field.HasDefaultValue || field.IsForeignKey) {
|
||||||
if !field.IsForeignKey || !field.IsBlank || field.HasDefaultValue {
|
if !field.IsForeignKey || !field.IsBlank || !field.HasDefaultValue {
|
||||||
sqls = append(sqls, fmt.Sprintf("%v = %v", scope.Quote(field.DBName), scope.AddToVars(field.Field.Interface())))
|
sqls = append(sqls, fmt.Sprintf("%v = %v", scope.Quote(field.DBName), scope.AddToVars(field.Field.Interface())))
|
||||||
}
|
}
|
||||||
} else if relationship := field.Relationship; relationship != nil && relationship.Kind == "belongs_to" {
|
} else if relationship := field.Relationship; relationship != nil && relationship.Kind == "belongs_to" {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user