- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for Pi (0.1 sec)
-
tests/hooks_test.go
gorm.Model Code string Product4ID uint AfterFindCallTimes int } func (pi ProductItem) BeforeCreate(*gorm.DB) error { if pi.Code == "invalid" { return errors.New("invalid item") } return nil } func (pi *ProductItem) AfterFind(*gorm.DB) error { pi.AfterFindCallTimes = pi.AfterFindCallTimes + 1 return nil } func TestFailedToSaveAssociationShouldRollback(t *testing.T) {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Sat Feb 18 01:20:29 GMT 2023 - 15.9K bytes - Viewed (0)