- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for where (0.13 sec)
-
tests/associations_has_many_test.go
CheckUser(t, user2, user) var pets []Pet DB.Model(&user).Where("name = ?", user.Pets[0].Name).Association("Pets").Find(&pets) if len(pets) != 1 { t.Fatalf("should only find one pets, but got %v", len(pets)) } CheckPet(t, pets[0], *user.Pets[0]) if count := DB.Model(&user).Where("name = ?", user.Pets[1].Name).Association("Pets").Count(); count != 1 {
Go - Registered: Sun May 05 09:35:13 GMT 2024 - Last Modified: Fri Dec 15 08:36:08 GMT 2023 - 15.6K bytes - Viewed (0)