fix: generated sql query fields do not match template (#2004)

* Fix typo

* Match generated sql query fields with template
This commit is contained in:
Richard Yi
2022-07-11 23:06:00 +08:00
committed by GitHub
parent e672b3f8e1
commit 6e50c87dca
3 changed files with 3 additions and 3 deletions

View File

@@ -31,7 +31,7 @@ func genInsert(table Table, withCache, postgreSql bool) (string, string, error)
var count int
for _, field := range table.Fields {
camel := util.SafeString(field.Name.ToCamel())
if camel == "CreateTime" || camel == "UpdateTime" {
if camel == "CreateTime" || camel == "UpdateTime" || camel == "CreateAt" || camel == "UpdateAt" {
continue
}

View File

@@ -21,7 +21,7 @@ func genUpdate(table Table, withCache, postgreSql bool) (
}
for _, field := range table.Fields {
camel := util.SafeString(field.Name.ToCamel())
if camel == "CreateTime" || camel == "UpdateTime" {
if camel == "CreateTime" || camel == "UpdateTime" || camel == "CreateAt" || camel == "UpdateAt" {
continue
}