From 67d1348f4fdc1cc7c850e1cf9ba88b62bae46590 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Tue, 29 Jun 2021 20:39:21 +0800 Subject: [PATCH] Fix bug --- session.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/session.go b/session.go index 253d6c09..f080b276 100644 --- a/session.go +++ b/session.go @@ -435,7 +435,7 @@ func bean2Map(parser *tags.Parser, bean interface{}) (map[string]reflect.Value, if colV == nil { continue } - res[col.Name] = *colV + res[strings.ToUpper(col.Name)] = *colV } return res, nil } @@ -449,7 +449,7 @@ func getValues(parser *tags.Parser, bean interface{}, fields ...string) ([]refle for _, field := range fields { v, ok := values[strings.ToUpper(field)] if !ok { - return nil, fmt.Errorf("cannot find column %s on bean %#v", field, bean) + return nil, fmt.Errorf("cannot find column %s on bean %#v,,,,%#v", field, bean, values) } res = append(res, v) }