Fix orm many2many generated table error

This commit is contained in:
AllenX2018 2021-01-07 11:40:32 +08:00 committed by Ming Deng
parent f8f0231764
commit 1c9f9e79e7

View File

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