- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 126 for getUser (0.08 sec)
-
tests/associations_belongs_to_test.go
DB.Model(&users).Association("Manager").Append( GetUser("manager-slice-belongs-to-1", Config{}), GetUser("manager-slice-belongs-to-2", Config{}), GetUser("manager-slice-belongs-to-3", Config{}), ) AssertAssociationCount(t, users, "Manager", 3, "After Append") if err := DB.Model(&users).Association("Manager").Append( GetUser("manager-slice-belongs-to-test-1", Config{}), ).Error; err == nil {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Oct 30 09:15:49 UTC 2023 - 9.3K bytes - Viewed (0) -
tests/query_test.go
users := []User{ *GetUser("find_in_batches_with_offset_limit", Config{}), *GetUser("find_in_batches_with_offset_limit", Config{}), *GetUser("find_in_batches_with_offset_limit", Config{}), *GetUser("find_in_batches_with_offset_limit", Config{}), *GetUser("find_in_batches_with_offset_limit", Config{}), *GetUser("find_in_batches_with_offset_limit", Config{}), *GetUser("find_in_batches_with_offset_limit", Config{}),
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 50.4K bytes - Viewed (0) -
tests/associations_has_many_test.go
} AssertAssociationCount(t, user2, "Team", 0, "after clear") } func TestHasManyAssociationForSlice(t *testing.T) { users := []User{ *GetUser("slice-hasmany-1", Config{Pets: 2}), *GetUser("slice-hasmany-2", Config{Pets: 0}), *GetUser("slice-hasmany-3", Config{Pets: 4}), } DB.Create(&users) // Count AssertAssociationCount(t, users, "Pets", 6, "") // Find var pets []Pet
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 16K bytes - Viewed (0) -
tests/scopes_test.go
return func(d *gorm.DB) *gorm.DB { return d.Where("name in (?)", names) } } func TestScopes(t *testing.T) { users := []*User{ GetUser("ScopeUser1", Config{}), GetUser("ScopeUser2", Config{}), GetUser("ScopeUser3", Config{}), } DB.Create(&users) var users1, users2, users3 []User DB.Scopes(NameIn1And2).Find(&users1) if len(users1) != 2 {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Jan 12 08:42:21 UTC 2024 - 3.3K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/app/web/admin/user/AdminUserAction.java
if (form instanceof EditForm) { return ComponentUtil.getComponent(UserService.class).getUser(((EditForm) form).id); } break; default: break; } return OptionalEntity.empty(); } public static OptionalEntity<User> getUser(final CreateForm form) { return getEntity(form).map(entity -> {
Registered: Thu Oct 31 13:40:30 UTC 2024 - Last Modified: Thu Feb 22 01:53:18 UTC 2024 - 15.9K bytes - Viewed (0) -
tests/count_test.go
t.Errorf("Count with group should be 2, but got count: %v", count2) } } func TestCount(t *testing.T) { var ( user1 = *GetUser("count-1", Config{}) user2 = *GetUser("count-2", Config{}) user3 = *GetUser("count-3", Config{}) users []User count, count1, count2 int64 ) DB.Save(&user1).Save(&user2).Save(&user3)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Oct 30 09:15:49 UTC 2023 - 6.9K bytes - Viewed (0) -
tests/associations_has_one_test.go
t.Errorf("account's number should not be saved") } } func TestHasOneAssociationForSlice(t *testing.T) { users := []User{ *GetUser("slice-hasone-1", Config{Account: true}), *GetUser("slice-hasone-2", Config{Account: false}), *GetUser("slice-hasone-3", Config{Account: true}), } DB.Create(&users) // Count AssertAssociationCount(t, users, "Account", 2, "") // Find
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/helper_test.go
} if config.Company { user.Company = Company{Name: "company-" + name} } if config.Manager { user.Manager = GetUser(name+"_manager", Config{}) } for i := 0; i < config.Team; i++ { user.Team = append(user.Team, *GetUser(name+"_team_"+strconv.Itoa(i+1), Config{})) } for i := 0; i < config.Languages; i++ { name := name + "_locale_" + strconv.Itoa(i+1)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Mar 19 03:50:28 UTC 2024 - 8K bytes - Viewed (0) -
tests/connpool_test.go
} tx := db.Begin() user := *GetUser("transaction", Config{}) if err = tx.Save(&user).Error; err != nil { t.Fatalf("No error should raise, but got %v", err) } if err = tx.First(&User{}, "name = ?", "transaction").Error; err != nil { t.Fatalf("Should find saved record, but got %v", err) } user1 := *GetUser("transaction1-1", Config{})
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Feb 06 02:54:40 UTC 2024 - 5.5K bytes - Viewed (0) -
tests/prepared_stmt_test.go
} ctx, cancel := context.WithTimeout(context.Background(), 500*time.Millisecond) defer cancel() txCtx := tx.WithContext(ctx) user := *GetUser("prepared_stmt", Config{}) txCtx.Create(&user) var result1 User if err := txCtx.Find(&result1, user.ID).Error; err != nil { t.Fatalf("no error should happen but got %v", err) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Aug 22 11:02:05 UTC 2024 - 8.5K bytes - Viewed (0)