From 1cbf16b3bf8256f1b1b3224bf9b1a0bcaa8417e8 Mon Sep 17 00:00:00 2001 From: Gani Georgiev Date: Thu, 22 Jun 2023 16:29:58 +0300 Subject: [PATCH] ucfirst the DynamicModel field name so that we can use later the same FieldMapper resolver rules --- plugins/jsvm/vm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/jsvm/vm.go b/plugins/jsvm/vm.go index 63e7aeb3..7fcff03f 100644 --- a/plugins/jsvm/vm.go +++ b/plugins/jsvm/vm.go @@ -455,7 +455,7 @@ func newDynamicModel(shape map[string]any) any { shapeValues = append(shapeValues, reflect.ValueOf(v)) structFields = append(structFields, reflect.StructField{ - Name: strings.ToUpper(k), // ensures that the field is exportable + Name: strings.Title(k), // ensures that the field is exportable Type: vt, Tag: reflect.StructTag(`db:"` + k + `" json:"` + k + `"`), })