- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestUpdates (0.07 sec)
-
tests/update_test.go
} if rowsAffected := DB.Model(users).Where("age > 0").Update("name", "jinzhu").RowsAffected; rowsAffected != 3 { t.Errorf("should only update one record, but got %v", rowsAffected) } } func TestUpdates(t *testing.T) { users := []*User{ GetUser("updates_01", Config{}), GetUser("updates_02", Config{}), } DB.Create(&users) lastUpdatedAt := users[0].UpdatedAt // update with map
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Dec 04 03:50:58 UTC 2023 - 30.3K bytes - Viewed (0)