mirror of https://github.com/go-gorm/gorm.git
fix: endless loop in save
This commit is contained in:
parent
0123dd4509
commit
ec1a1d81b0
|
@ -75,7 +75,7 @@ func (db *DB) Save(value interface{}) (tx *DB) {
|
||||||
tx.Statement.Dest = value
|
tx.Statement.Dest = value
|
||||||
|
|
||||||
reflectValue := reflect.Indirect(reflect.ValueOf(value))
|
reflectValue := reflect.Indirect(reflect.ValueOf(value))
|
||||||
for reflectValue.Kind() == reflect.Ptr || reflectValue.Kind() == reflect.Interface {
|
for reflectValue.Kind() == reflect.Ptr {
|
||||||
reflectValue = reflect.Indirect(reflectValue)
|
reflectValue = reflect.Indirect(reflectValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue