This repository has been archived by the owner on Sep 7, 2021. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.
panic when update using map: call of reflect.Value.Interface on zero Value #1407
Labels
panic when update using map
reproduce example:
possible fix,
xorm.io/core/column.go
:// ValueOfV returns column's filed of struct's value accept reflevt value func (col *Column) ValueOfV(dataStruct *reflect.Value) (*reflect.Value, error) { var fieldValue reflect.Value fieldPath := strings.Split(col.FieldName, ".") if dataStruct.Type().Kind() == reflect.Map { + fieldPath := strings.Split(col.Name, ".") keyValue := reflect.ValueOf(fieldPath[len(fieldPath)-1])
The text was updated successfully, but these errors were encountered: