- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for AfterAppendSlice (0.52 sec)
-
tests/associations_has_many_test.go
pet := pet if pet.ID == 0 { t.Fatalf("Pet's ID should be created") } user.Pets = append(user.Pets, &pet) } CheckUser(t, user2, user) AssertAssociationCount(t, user, "Pets", 5, "AfterAppendSlice") // Replace pet2 := Pet{Name: "pet-has-many-replace"} if err := DB.Model(&user2).Association("Pets").Replace(&pet2); err != nil { t.Fatalf("Error happened when append pet, got %v", err) }Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Fri Sep 12 04:33:27 UTC 2025 - 16.3K bytes - Viewed (0) -
tests/associations_many2many_test.go
t.Fatalf("Error happened when append language, got %v", err) } user.Languages = append(user.Languages, languages...) CheckUser(t, user2, user) AssertAssociationCount(t, user, "Languages", 5, "AfterAppendSlice") // Replace language2 := Language{Code: "language-many2many-replace", Name: "language-many2many-replace"} DB.Create(&language2)
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Sat Jun 10 13:05:19 UTC 2023 - 13.2K bytes - Viewed (0)