- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 32 for pet1 (0.02 sec)
-
tests/associations_has_one_test.go
func TestPolymorphicHasOneAssociation(t *testing.T) { pet := Pet{Name: "hasone", Toy: Toy{Name: "toy-has-one"}} if err := DB.Create(&pet).Error; err != nil { t.Fatalf("errors happened when create: %v", err) } CheckPet(t, pet, pet) // Find var pet2 Pet DB.Find(&pet2, "id = ?", pet.ID) DB.Model(&pet2).Association("Toy").Find(&pet2.Toy) CheckPet(t, pet2, pet) // Count
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 7.1K bytes - Viewed (0) -
tests/associations_has_many_test.go
&Pet{Name: "pet-slice-append-1"}, []*Pet{{Name: "pet-slice-append-2-1"}, {Name: "pet-slice-append-2-2"}}, &Pet{Name: "pet-slice-append-3"}, ) AssertAssociationCount(t, users, "Pets", 10, "After Append") // Replace -> same as append DB.Model(&users).Association("Pets").Replace( []*Pet{{Name: "pet-slice-replace-1-1"}, {Name: "pet-slice-replace-1-2"}},
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 16K bytes - Viewed (0) -
tests/preload_test.go
} else { sort.Slice(users2[2].Pets, func(i, j int) bool { return users2[2].Pets[i].ID < users2[2].Pets[j].ID }) for _, pet := range users2[2].Pets[0:2] { if pet.Toy.Name != "" { t.Errorf("No toy should for user %v's pet %v but got %v", 3, pet.Name, pet.Toy.Name) } } CheckPet(t, *users2[2].Pets[2], *users[2].Pets[2]) } } func TestPreloadEmptyData(t *testing.T) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:00:47 UTC 2024 - 15.9K bytes - Viewed (0) -
tests/joins_test.go
DB.Joins("inner join pets on pets.user_id = users.id AND pets.name = @Name", user.Pets[0]).Where("users.name = ?", user.Name).First(&users6) if len(users6) != 1 { t.Errorf("should find one users using left join with conditions, but got %v", len(users6)) } dryDB := DB.Session(&gorm.Session{DryRun: true})
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 17 03:58:13 UTC 2024 - 15K bytes - Viewed (0) -
schema/schema_test.go
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jun 20 12:19:31 UTC 2024 - 13.3K bytes - Viewed (0) -
android/guava/src/com/google/common/collect/Sets.java
public static <E extends @Nullable Object> SetView<E> union( final Set<? extends E> set1, final Set<? extends E> set2) { checkNotNull(set1, "set1"); checkNotNull(set2, "set2"); return new SetView<E>() { @Override public int size() { int size = set1.size(); for (E e : set2) { if (!set1.contains(e)) { size++; } } return size;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Oct 21 14:28:19 UTC 2024 - 78.8K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ForwardingSortedSetTest.java
} }); } public void testEquals() { SortedSet<String> set1 = ImmutableSortedSet.of("one"); SortedSet<String> set2 = ImmutableSortedSet.of("two"); new EqualsTester() .addEqualityGroup(set1, wrap(set1), wrap(set1)) .addEqualityGroup(set2, wrap(set2)) .testEquals(); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 5K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ForwardingSortedMultisetTest.java
} }); } public void testEquals() { SortedMultiset<String> set1 = ImmutableSortedMultiset.of("one"); SortedMultiset<String> set2 = ImmutableSortedMultiset.of("two"); new EqualsTester() .addEqualityGroup(set1, wrap(set1), wrap(set1)) .addEqualityGroup(set2, wrap(set2)) .testEquals(); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 6.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/collect/ForwardingSortedMultisetTest.java
} }); } public void testEquals() { SortedMultiset<String> set1 = ImmutableSortedMultiset.of("one"); SortedMultiset<String> set2 = ImmutableSortedMultiset.of("two"); new EqualsTester() .addEqualityGroup(set1, wrap(set1), wrap(set1)) .addEqualityGroup(set2, wrap(set2)) .testEquals(); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 6.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/collect/ForwardingSortedSetTest.java
} }); } public void testEquals() { SortedSet<String> set1 = ImmutableSortedSet.of("one"); SortedSet<String> set2 = ImmutableSortedSet.of("two"); new EqualsTester() .addEqualityGroup(set1, wrap(set1), wrap(set1)) .addEqualityGroup(set2, wrap(set2)) .testEquals(); }
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Sat Oct 19 00:05:46 UTC 2024 - 5K bytes - Viewed (0)