diff --git a/schema/naming.go b/schema/naming.go index d2a4919f..9b7c9471 100644 --- a/schema/naming.go +++ b/schema/naming.go @@ -41,6 +41,9 @@ func (ns NamingStrategy) ColumnName(table, column string) string { // JoinTableName convert string to join table name func (ns NamingStrategy) JoinTableName(str string) string { + if ns.SingularTable { + return ns.TablePrefix + toDBName(str) + } return ns.TablePrefix + inflection.Plural(toDBName(str)) }