fix: generated sql query fields do not match template (#2004)
* Fix typo * Match generated sql query fields with template
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user