Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 37 for Toy (0.11 sec)

  1. 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
    //	}
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 22.4K bytes
    - Viewed (0)
  2. 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)
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 2K bytes
    - Viewed (0)
  3. helm/minio/README.md

    The command deploys MinIO on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
    
    ### Installing the Chart (toy-setup)
    
    Minimal toy setup for testing purposes can be deployed using:
    
    ```bash
    Plain Text
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Jan 24 07:27:57 GMT 2024
    - 10.9K bytes
    - Viewed (0)
  4. 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"`
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 1.1K bytes
    - Viewed (0)
  5. docs/iam/identity-management-plugin.md

    ```json
    {
        "reason": <string>
    }
    ```
    
    The reason message is returned to the client.
    
    ## Example Plugin Implementation
    
    Plain Text
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 27 00:58:09 GMT 2022
    - 4.2K bytes
    - Viewed (0)
  6. 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",
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:31:23 GMT 2023
    - 12.9K bytes
    - Viewed (0)
  7. 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] })
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:36:08 GMT 2023
    - 3.3K bytes
    - Viewed (1)
  8. 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}.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Mar 31 23:52:53 GMT 2024
    - 4.4K bytes
    - Viewed (0)
  9. 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) |
    |--------:|------------------:|------------:|------------------------:|------------------------------:|-------------------------------:|
    Plain Text
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Aug 15 23:04:20 GMT 2023
    - 3.9K bytes
    - Viewed (0)
  10. tests/delete_test.go

    	if err := DB.Create(user).Error; err != nil {
    		t.Fatalf("failed to create user, got error %v", err)
    	}
    
    	if err := DB.Select(clause.Associations, "Pets.Toy").Delete(&user).Error; err != nil {
    		t.Fatalf("failed to delete user, got error %v", err)
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Oct 10 07:03:34 GMT 2023
    - 9.4K bytes
    - Viewed (0)
Back to top