- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for TestUpdateHasManyAssociations (0.22 sec)
-
tests/update_has_many_test.go
package tests_test import ( "testing" "gorm.io/gorm" . "gorm.io/gorm/utils/tests" ) func TestUpdateHasManyAssociations(t *testing.T) { user := *GetUser("update-has-many", Config{}) if err := DB.Create(&user).Error; err != nil { t.Fatalf("errors happened when create: %v", err) } user.Pets = []*Pet{{Name: "pet1"}, {Name: "pet2"}} if err := DB.Save(&user).Error; err != nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jan 06 07:02:53 UTC 2022 - 2K bytes - Viewed (0)