Merge branch 'develop' of https://github.com/beego/beego into feature/route-method-expressions

This commit is contained in:
Jason li 2021-01-07 21:26:13 +08:00
commit 187c2da5a1

View File

@ -109,6 +109,9 @@ func getTableUnique(val reflect.Value) [][]string {
// get whether the table needs to be created for the database alias // get whether the table needs to be created for the database alias
func isApplicableTableForDB(val reflect.Value, db string) bool { func isApplicableTableForDB(val reflect.Value, db string) bool {
if !val.IsValid() {
return true
}
fun := val.MethodByName("IsApplicableTableForDB") fun := val.MethodByName("IsApplicableTableForDB")
if fun.IsValid() { if fun.IsValid() {
vals := fun.Call([]reflect.Value{reflect.ValueOf(db)}) vals := fun.Call([]reflect.Value{reflect.ValueOf(db)})