- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 35 for toys (0.03 sec)
-
tests/associations_has_many_test.go
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:49:45 UTC 2024 - 16K bytes - Viewed (0) -
tests/associations_has_one_test.go
{Name: "hasone-2", Toy: Toy{}}, {Name: "hasone-3", Toy: Toy{Name: "toy-has-one"}}, } DB.Create(&pets) // Count AssertAssociationCount(t, pets, "Toy", 2, "") // Find var toys []Toy if DB.Model(&pets).Association("Toy").Find(&toys); len(toys) != 2 { t.Errorf("toys count should be %v, but got %v", 3, len(toys)) } // Append
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/preload_test.go
user := *GetUser("nested_preload", Config{Pets: 1}) pet := user.Pets[0] pet.Toy = Toy{Name: "toy_nested_preload_" + strconv.Itoa(1)} pet.Toy = Toy{Name: "toy_nested_preload_" + strconv.Itoa(2)} if err := DB.Create(&user).Error; err != nil { t.Fatalf("errors happened when create: %v", err) } var user2 User DB.Preload("Pets.Toy").Find(&user2, "id = ?", user.ID) CheckUser(t, user2, user) DB.Delete(&pet)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 10:00:47 UTC 2024 - 15.9K bytes - Viewed (0) -
schema/relationship.go
relationships.Relations[relation.Name] = relation } } } // User has many Toys, its `Polymorphic` is `Owner`, Pet has one Toy, its `Polymorphic` is `Owner` // // type User struct { // Toys []Toy `gorm:"polymorphic:Owner;"` // } // type Pet struct { // Toy Toy `gorm:"polymorphic:Owner;"` // } // type Toy struct { // OwnerID int // OwnerType string // }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Wed Jun 12 03:46:59 UTC 2024 - 22.7K bytes - Viewed (0) -
schema/schema_test.go
References: []Reference{{"ID", "User", "UserID", "Pet", "", true}}, }, { Name: "Toys", Type: schema.HasMany, Schema: "User", FieldSchema: "Toy", Polymorphic: Polymorphic{ID: "OwnerID", Type: "OwnerType", Value: "users"}, References: []Reference{{"ID", "User", "OwnerID", "Toy", "", true}, {"", "", "OwnerType", "Toy", "users", false}}, }, {
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jun 20 12:19:31 UTC 2024 - 13.3K bytes - Viewed (0) -
tests/query_test.go
} } func TestQueryWithAssociation(t *testing.T) { user := *GetUser("query_with_association", Config{Account: true, Pets: 2, Toys: 1, Company: true, Manager: true, Team: 2, Languages: 1, Friends: 3}) if err := DB.Create(&user).Error; err != nil { t.Fatalf("errors happened when create user: %v", err) } user.CreatedAt = time.Time{}
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 50.4K bytes - Viewed (0) -
docs/fr/docs/tutorial/body.md
Pour déclarer un corps de **requête**, on utilise les modèles de <a href="https://docs.pydantic.dev/" class="external-link" target="_blank">Pydantic</a> en profitant de tous leurs avantages et fonctionnalités. /// info Pour envoyer de la donnée, vous devriez utiliser : `POST` (le plus populaire), `PUT`, `DELETE` ou `PATCH`.
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 17:34:41 UTC 2024 - 7.6K bytes - Viewed (0) -
cmd/metrics-v3-replication.go
m.Set(replicationMaxActiveWorkers, float64(qa.Max)) if len(qs.XferStats) > 0 { tots := qs.XferStats[Total] m.Set(replicationAverageDataTransferRate, tots.Avg) m.Set(replicationCurrentDataTransferRate, tots.Curr) m.Set(replicationMaxDataTransferRate, tots.Peak) } m.Set(replicationRecentBacklogCount, float64(qs.MRFStats.LastFailedCount)) return nil
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Thu Aug 15 12:04:40 UTC 2024 - 4.6K bytes - Viewed (0) -
docs/fr/docs/history-design-future.md
Ainsi, j'ai pu trouver les meilleurs moyens de réduire autant que possible la duplication du code, d'avoir la complétion partout, les contrôles de type et d'erreur, etc. Le tout de manière à offrir la meilleure expérience de développement à tous les développeurs. ## Exigences
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Mon Jul 29 23:35:07 UTC 2024 - 4.9K bytes - Viewed (0) -
tests/joins_test.go
Name: "nested-joins-manager-company-1", }, NamedPet: &Pet{ Name: "nested-joins-manager-namepet-1", Toy: Toy{ Name: "nested-joins-manager-namepet-toy-1", }, }, }, NamedPet: &Pet{Name: "nested-joins-namepet-1", Toy: Toy{Name: "nested-joins-namepet-toy-1"}}, }, { Name: "nested-joins-2",
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 17 03:58:13 UTC 2024 - 15K bytes - Viewed (0)