Compare commits

...

2 Commits

Author SHA1 Message Date
Jannis Rieger 5afc46e8d0
Merge ec1a1d81b0 into 49bbaa637f 2024-11-14 17:50:31 +08:00
Jannis Rieger ec1a1d81b0 fix: endless loop in save 2024-01-20 01:40:15 +01:00
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,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)
} }