Merge pull request #4420 from AllenX2018/Fix-ORM-many2many-generated-table-error
Fix orm many2many generated table bug
This commit is contained in:
commit
7d2c5486be
@ -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)})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user