- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestHooksForSlice (0.29 sec)
-
tests/hooks_test.go
DB.Session(&gorm.Session{SkipHooks: true}).Create(&product2) if product2.Price != 0 { t.Errorf("invalid price after create without hooks, got %+v", product2) } } func TestHooksForSlice(t *testing.T) { DB.Migrator().DropTable(&Product3{}) DB.AutoMigrate(&Product3{}) products := []*Product3{ {Name: "Product-1", Price: 100}, {Name: "Product-2", Price: 200},
Registered: Sun Sep 07 09:35:13 UTC 2025 - Last Modified: Mon Jun 17 03:59:06 UTC 2024 - 16.7K bytes - Viewed (0)