forked from mirror/gorm
Set PrimaryField IsBlank to false after read from returning value
This commit is contained in:
parent
6732a50dfb
commit
3425c1d38d
|
@ -118,6 +118,7 @@ func createCallback(scope *Scope) {
|
|||
}
|
||||
} else {
|
||||
if err := scope.SQLDB().QueryRow(scope.SQL, scope.SQLVars...).Scan(primaryField.Field.Addr().Interface()); scope.Err(err) == nil {
|
||||
primaryField.IsBlank = false
|
||||
scope.db.RowsAffected = 1
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue