| 7 | ) |
| 8 | |
| 9 | type Man struct { |
| 10 | ID int |
| 11 | Age int |
| 12 | Name string |
| 13 | Detail string |
| 14 | } |
| 15 | |
| 16 | // Panic-safe BeforeUpdate hook that checks for Changed("age") |
| 17 | func (m *Man) BeforeUpdate(tx *gorm.DB) (err error) { |
nothing calls this directly
no outgoing calls
no test coverage detected