Give (*ModelStruct).TableName() a pointer receiver
There was a data race caused by the copy of the ModelStruct. See #723. Fixes #723.
This commit is contained in:
		
							parent
							
								
									d209be3138
								
							
						
					
					
						commit
						5ba59aec5f
					
				@ -48,7 +48,7 @@ type ModelStruct struct {
 | 
				
			|||||||
	cached           bool
 | 
						cached           bool
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (s ModelStruct) TableName(db *DB) string {
 | 
					func (s *ModelStruct) TableName(db *DB) string {
 | 
				
			||||||
	return DefaultTableNameHandler(db, s.defaultTableName)
 | 
						return DefaultTableNameHandler(db, s.defaultTableName)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user