SingularTable for JoinTable
This commit is contained in:
		
							parent
							
								
									eeee014500
								
							
						
					
					
						commit
						e308b103c0
					
				| @ -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)) | ||||
| } | ||||
| 
 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Jinzhu
						Jinzhu