Open p581581 opened 6 years ago
Because mark_1 -> Mark1 but Mark1 -> mark1.
yeah I know the rule, but is there another way to fix it and keep underscores, like field's name mapping?
You can write yourself mapper or you can give a specify tag as a column name.
type Mark struct {
Mark1 string `xorm:"VARCHAR(1) mark_1"`
Mark2 string `xorm:"VARCHAR(1) mark_2"`
MarkA string `xorm:"VARCHAR(1) mark_a"`
}
When field's names contain a underscore between a letter and a number cause "無效的資料行名稱" error, but it works fine when a underscore between letters
For example:
then, use xorm reverse to generate Mark.go
and then use
find
in my handler:it throws an error "無效的資料行名稱" Mark2.
please, help.