Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for body (0.15 sec)

  1. tests/customize_field_test.go

    	// Make sure an ignored field does not interfere with another field's custom
    	// column name that matches the ignored field.
    	type CustomColumnAndIgnoredFieldClash struct {
    		Body    string `gorm:"-"`
    		RawBody string `gorm:"column:body"`
    	}
    
    	DB.Migrator().DropTable(&CustomColumnAndIgnoredFieldClash{})
    
    	if err := DB.AutoMigrate(&CustomColumnAndIgnoredFieldClash{}); err != nil {
    		t.Errorf("Should not raise error: %v", err)
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Fri Sep 11 09:33:31 GMT 2020
    - 6.9K bytes
    - Viewed (0)
  2. tests/multi_primary_keys_test.go

    	if err := DB.AutoMigrate(&Blog{}, &Tag{}); err != nil {
    		t.Fatalf("Failed to auto migrate, got error: %v", err)
    	}
    
    	blog := Blog{
    		Locale:  "ZH",
    		Subject: "subject",
    		Body:    "body",
    		Tags: []Tag{
    			{Locale: "ZH", Value: "tag1"},
    			{Locale: "ZH", Value: "tag2"},
    		},
    	}
    
    	DB.Save(&blog)
    	if !compareTags(blog.Tags, []string{"tag1", "tag2"}) {
    		t.Fatalf("Blog should has two tags")
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 12.8K bytes
    - Viewed (0)
  3. schema/relationship_test.go

    		Locale string `gorm:"primary_key"`
    		Value  string
    	}
    
    	type Blog struct {
    		ID         uint   `gorm:"primary_key"`
    		Locale     string `gorm:"primary_key"`
    		Subject    string
    		Body       string
    		Tags       []Tag `gorm:"many2many:blog_tags;"`
    		SharedTags []Tag `gorm:"many2many:shared_blog_tags;ForeignKey:id;References:id"`
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 25.5K bytes
    - Viewed (0)
Back to top