- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for BeforeCreate (0.05 sec)
-
callbacks/interfaces.go
package callbacks import "gorm.io/gorm" type BeforeCreateInterface interface { BeforeCreate(*gorm.DB) error } type AfterCreateInterface interface { AfterCreate(*gorm.DB) error } type BeforeUpdateInterface interface { BeforeUpdate(*gorm.DB) error } type AfterUpdateInterface interface { AfterUpdate(*gorm.DB) error } type BeforeSaveInterface interface { BeforeSave(*gorm.DB) error }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 27 07:03:57 UTC 2020 - 667 bytes - Viewed (0) -
schema/callbacks_test.go
if !reflect.Indirect(reflect.ValueOf(user)).FieldByName(str).Interface().(bool) { t.Errorf("%v should be true", str) } } for _, str := range []string{"BeforeCreate", "BeforeUpdate", "AfterUpdate", "AfterSave", "BeforeDelete", "AfterDelete", "AfterFind"} { if reflect.Indirect(reflect.ValueOf(user)).FieldByName(str).Interface().(bool) { t.Errorf("%v should be false", str) } }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jan 06 07:02:53 UTC 2022 - 939 bytes - Viewed (0) -
callbacks/callbacks.go
} createCallback := db.Callback().Create() createCallback.Match(enableTransaction).Register("gorm:begin_transaction", BeginTransaction) createCallback.Register("gorm:before_create", BeforeCreate) createCallback.Register("gorm:save_before_associations", SaveBeforeAssociations(true)) createCallback.Register("gorm:create", Create(config)) createCallback.Register("gorm:save_after_associations", SaveAfterAssociations(true))
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Oct 27 23:56:55 UTC 2021 - 3.3K bytes - Viewed (0)