- Sort Score
- Result 10 results
- Languages All
Results 171 - 180 of 472 for reload (0.07 sec)
-
tests/update_has_many_test.go
t.Fatalf("errors happened when update: %v", err) } var user2 User DB.Preload("Pets").Find(&user2, "id = ?", user.ID) CheckUser(t, user2, user) for _, pet := range user.Pets { pet.Name += "new" } if err := DB.Save(&user).Error; err != nil { t.Fatalf("errors happened when update: %v", err) } var user3 User DB.Preload("Pets").Find(&user3, "id = ?", user.ID) CheckUser(t, user2, user3)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jan 06 07:02:53 UTC 2022 - 2K bytes - Viewed (0) -
tests/associations_test.go
func TestAssociationError(t *testing.T) { user := *GetUser("TestAssociationError", Config{Pets: 2, Company: true, Account: true, Languages: 2}) DB.Create(&user) var user1 User DB.Preload("Company").Preload("Pets").Preload("Account").Preload("Languages").First(&user1) var emptyUser User var err error // belongs to err = DB.Model(&emptyUser).Association("Company").Delete(&user1.Company)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Feb 08 08:29:09 UTC 2023 - 10.9K bytes - Viewed (0) -
tests/preload_suits_test.go
Level0s: []Level0{}, }, }, }, } if err := DB.Create(&want[1]).Error; err != nil { t.Error(err) } var got []Level3 if err := DB.Preload("Level2").Preload("Level2.Level1s").Preload("Level2_1").Preload("Level2_1.Level1s").Preload("Level2_1.Level1s.Level0s").Find(&got).Error; err != nil { t.Error(err) } if string(toJSONString(got)) != string(toJSONString(want)) {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Fri Mar 18 05:38:46 UTC 2022 - 30.3K bytes - Viewed (0) -
tests/named_polymorphic_test.go
DB.Save(&hamster) hamster2 := Hamster{} DB.Preload("PreferredToy").Preload("OtherToy").Find(&hamster2, hamster.Id) if hamster2.PreferredToy.ID != hamster.PreferredToy.ID || hamster2.PreferredToy.Name != hamster.PreferredToy.Name { t.Errorf("Hamster's preferred toy failed to preload") } if hamster2.OtherToy.ID != hamster.OtherToy.ID || hamster2.OtherToy.Name != hamster.OtherToy.Name {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jul 08 09:59:40 UTC 2020 - 4.2K bytes - Viewed (0) -
tests/update_has_one_test.go
t.Fatalf("errors happened when update: %v", err) } var user2 User DB.Preload("Account").Find(&user2, "id = ?", user.ID) CheckUser(t, user2, user) user.Account.Number += "new" if err := DB.Save(&user).Error; err != nil { t.Fatalf("errors happened when update: %v", err) } var user3 User DB.Preload("Account").Find(&user3, "id = ?", user.ID) CheckUser(t, user2, user3)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jul 14 06:55:54 UTC 2022 - 3.6K bytes - Viewed (0) -
CHANGELOG/CHANGELOG-1.31.md
- [Container Images](#container-images-2) - [Changelog since v1.30.0](#changelog-since-v1300) - [Urgent Upgrade Notes](#urgent-upgrade-notes) - [(No, really, you MUST read this before you upgrade)](#no-really-you-must-read-this-before-you-upgrade) - [Changes by Kind](#changes-by-kind-2) - [Deprecation](#deprecation-1) - [API Change](#api-change-1) - [Feature](#feature-2) - [Failing Test](#failing-test)
Registered: Fri Nov 01 09:05:11 UTC 2024 - Last Modified: Wed Oct 23 12:18:32 UTC 2024 - 315.4K bytes - Viewed (0) -
tests/multi_primary_keys_test.go
DB.Model(&blog).Association("Tags").Find(&tags) if !compareTags(tags, []string{"tag1", "tag2", "tag3"}) { t.Fatalf("Should find 3 tags") } var blog1 Blog DB.Preload("Tags").Find(&blog1) if !compareTags(blog1.Tags, []string{"tag1", "tag2", "tag3"}) { t.Fatalf("Preload many2many relations") } // Replace tag5 := &Tag{Locale: "ZH", Value: "tag5"} tag6 := &Tag{Locale: "ZH", Value: "tag6"}
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jan 06 07:02:53 UTC 2022 - 12.8K bytes - Viewed (0) -
internal/s3select/json/preader_test.go
t.Run(file.Name(), func(t *testing.T) { f, err := os.Open(filepath.Join("testdata", file.Name())) if err != nil { t.Fatal(err) } r := NewPReader(f, &ReaderArgs{}) var record sql.Record for { record, err = r.Read(record) if err != nil { break } } r.Close() if err != io.EOF { t.Fatalf("Reading failed with %s, %s", err, file.Name()) } })
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 2.5K bytes - Viewed (0) -
internal/s3select/json/reader_test.go
t.Run(file.Name(), func(t *testing.T) { f, err := os.Open(filepath.Join("testdata", file.Name())) if err != nil { t.Fatal(err) } r := NewReader(f, &ReaderArgs{}) var record sql.Record for { record, err = r.Read(record) if err != nil { break } } r.Close() if err != io.EOF { t.Fatalf("Reading failed with %s, %s", err, file.Name()) } })
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Mon Sep 19 18:05:16 UTC 2022 - 2.5K bytes - Viewed (0) -
tests/soft_delete_test.go
t.Errorf("Can't find a soft deleted record") } count = 0 if DB.Model(&User{}).Where("name = ?", user.Name).Count(&count).Error != nil || count != 0 { t.Errorf("Count soft deleted record, expects: %v, got: %v", 0, count) } age = 0 if DB.Model(&User{}).Select("age").Where("name = ?", user.Name).Scan(&age).Error != nil || age != 0 { t.Errorf("Age soft deleted record, expects: %v, got: %v", 0, age) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Feb 01 06:40:55 UTC 2023 - 5.7K bytes - Viewed (0)