mirror of
https://github.com/pocketbase/pocketbase.git
synced 2025-03-29 00:50:59 +02:00
ucfirst the DynamicModel field name so that we can use later the same FieldMapper resolver rules
This commit is contained in:
parent
dad289b90d
commit
1cbf16b3bf
@ -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 + `"`),
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user