Merge pull request #214 from majinkai/patch-1

bugfix #213
This commit is contained in:
Lunny Xiao 2015-03-06 22:18:45 +08:00
commit b2b60e569f
1 changed files with 1 additions and 1 deletions

View File

@ -933,7 +933,7 @@ func (engine *Engine) mapType(v reflect.Value) *core.Table {
table.AddColumn(col) table.AddColumn(col)
if fieldType.Kind() == reflect.Int64 && (col.FieldName == "Id" || strings.HasSuffix(col.FieldName, ".Id")) { if fieldType.Kind() == reflect.Int64 && (strings.ToUpper(col.FieldName) == "ID" || strings.HasSuffix(strings.ToUpper(col.FieldName), ".ID")) {
idFieldColName = col.Name idFieldColName = col.Name
} }
} // end for } // end for