- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 38 for Toy (0.02 sec)
-
schema/relationship.go
} } } // 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/model_test.go
"gorm.io/gorm/utils/tests" ) type User struct { *gorm.Model Name *string Age *uint Birthday *time.Time Account *tests.Account Pets []*tests.Pet Toys []*tests.Toy `gorm:"polymorphic:Owner"` CompanyID *int Company *tests.Company ManagerID *uint Manager *User Team []*User `gorm:"foreignkey:ManagerID"` Languages []*tests.Language `gorm:"many2many:UserSpeak"`
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jan 06 07:02:53 UTC 2022 - 1.1K bytes - Viewed (0) -
schema/schema_test.go
}, { 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}}, }, { Name: "Company", Type: schema.BelongsTo, Schema: "User", FieldSchema: "Company",
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jun 20 12:19:31 UTC 2024 - 13.3K bytes - Viewed (0) -
docs/distributed/SIZING.md
# Erasure code sizing guide ## Toy Setups Capacity constrained environments, MinIO will work but not recommended for production. | servers | drives (per node) | stripe_size | parity chosen (default) | tolerance for reads (servers) | tolerance for writes (servers) | |--------:|------------------:|------------:|------------------------:|------------------------------:|-------------------------------:|
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Aug 15 23:04:20 UTC 2023 - 3.9K bytes - Viewed (0) -
tests/tests_test.go
} else if debug == "false" { db.Logger = db.Logger.LogMode(logger.Silent) } return } func RunMigrations() { var err error allModels := []interface{}{&User{}, &Account{}, &Pet{}, &Company{}, &Toy{}, &Language{}, &Coupon{}, &CouponProduct{}, &Order{}, &Parent{}, &Child{}, &Tools{}} rand.Seed(time.Now().UnixNano()) rand.Shuffle(len(allModels), func(i, j int) { allModels[i], allModels[j] = allModels[j], allModels[i] })
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Sep 30 03:21:19 UTC 2024 - 3.3K bytes - Viewed (0) -
tests/update_has_many_test.go
t.Run("Polymorphic", func(t *testing.T) { user := *GetUser("update-has-many", Config{}) if err := DB.Create(&user).Error; err != nil { t.Fatalf("errors happened when create: %v", err) } user.Toys = []Toy{{Name: "toy1"}, {Name: "toy2"}} if err := DB.Save(&user).Error; err != nil { t.Fatalf("errors happened when update: %v", err) } var user2 User DB.Preload("Toys").Find(&user2, "id = ?", user.ID)
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Thu Jan 06 07:02:53 UTC 2022 - 2K bytes - Viewed (0) -
helm/minio/README.md
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Wed Jan 24 07:27:57 UTC 2024 - 10.9K bytes - Viewed (0) -
tests/delete_test.go
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Tue Oct 10 07:03:34 UTC 2023 - 9.4K bytes - Viewed (0) -
docs/iam/identity-management-plugin.md
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Fri May 27 00:58:09 UTC 2022 - 4.2K bytes - Viewed (0) -
docs/en/docs/how-to/custom-request-and-route.md
Let's see how to make use of a custom `Request` subclass to decompress gzip requests. And an `APIRoute` subclass to use that custom request class. ### Create a custom `GzipRequest` class /// tip This is a toy example to demonstrate how it works, if you need Gzip support, you can use the provided [`GzipMiddleware`](../advanced/middleware.md#gzipmiddleware){.internal-link target=_blank}. ///
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 27 22:39:38 UTC 2024 - 4.3K bytes - Viewed (0)