- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestCreateWithAutoIncrementCompositeKey (0.22 sec)
-
tests/create_test.go
res = DB.FirstOrCreate(&user, "name = ?", user.Name) if res.Error != nil || res.RowsAffected != 0 { t.Fatalf("first or create rows affect err:%v rows:%d", res.Error, res.RowsAffected) } } func TestCreateWithAutoIncrementCompositeKey(t *testing.T) { type CompositeKeyProduct struct { ProductID int `gorm:"primaryKey;autoIncrement:true;"` // primary key LanguageCode int `gorm:"primaryKey;"` // primary key
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 19 03:50:28 UTC 2024 - 26.4K bytes - Viewed (0)