mirror of
https://github.com/beego/bee.git
synced 2024-11-22 15:10:54 +00:00
Modified bug of use -tables arguments.
This commit is contained in:
parent
3dce57e793
commit
eaae7694b8
@ -145,9 +145,17 @@ func genHprose(dbms, connStr string, mode byte, selectedTableNames map[string]bo
|
|||||||
ColorLog("[INFO] Analyzing database tables...\n")
|
ColorLog("[INFO] Analyzing database tables...\n")
|
||||||
tableNames := trans.GetTableNames(db)
|
tableNames := trans.GetTableNames(db)
|
||||||
// 添加 Hprose Function
|
// 添加 Hprose Function
|
||||||
|
if selectedTableNames == nil {
|
||||||
for _, tb := range tableNames {
|
for _, tb := range tableNames {
|
||||||
hproseAddFunctions = append(hproseAddFunctions, strings.Replace(HPROSE_ADDFUNCTION, "{{modelName}}", camelCase(tb), -1))
|
hproseAddFunctions = append(hproseAddFunctions, strings.Replace(HPROSE_ADDFUNCTION, "{{modelName}}", camelCase(tb), -1))
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
for tb, v := range selectedTableNames {
|
||||||
|
if v {
|
||||||
|
hproseAddFunctions = append(hproseAddFunctions, strings.Replace(HPROSE_ADDFUNCTION, "{{modelName}}", camelCase(tb), -1))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// 添加结束
|
// 添加结束
|
||||||
tables := getTableObjects(tableNames, db, trans)
|
tables := getTableObjects(tableNames, db, trans)
|
||||||
mvcPath := new(MvcPath)
|
mvcPath := new(MvcPath)
|
||||||
|
Loading…
Reference in New Issue
Block a user