- Sort Score
- Num 10 results
- Language All
Results 1 - 1 of 1 for unique_code (0.04 seconds)
-
tests/hooks_test.go
DB.Migrator().DropTable(&Product{}) DB.AutoMigrate(&Product{}) p := Product{Code: "unique_code", Price: 100} DB.Save(&p) if !reflect.DeepEqual(p.GetCallTimes(), []int64{1, 1, 0, 1, 1, 0, 0, 0, 0}) { t.Fatalf("Callbacks should be invoked successfully, %v", p.GetCallTimes()) } DB.Where("Code = ?", "unique_code").First(&p) if !reflect.DeepEqual(p.GetCallTimes(), []int64{1, 1, 0, 1, 0, 0, 0, 0, 1}) {
Created: Sun Dec 28 09:35:17 GMT 2025 - Last Modified: Mon Jun 17 03:59:06 GMT 2024 - 16.7K bytes - Click Count (0)