Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for language_code (0.09 sec)

  1. schema/schema_test.go

    				},
    				{
    					Name: "LanguageCode", DBName: "language_code", BindNames: []string{"LanguageCode"}, DataType: schema.String,
    					Tag: `gorm:"primarykey"`, Creatable: true, Updatable: true, Readable: true, PrimaryKey: true,
    				},
    			}},
    			References: []Reference{{"ID", "User", "UserID", "UserSpeak", "", true}, {"Code", "Language", "LanguageCode", "UserSpeak", "", 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)
  2. tests/joins_test.go

    	type UserSpeak struct {
    		UserID       uint
    		LanguageCode string
    	}
    	type Result struct {
    		User
    		UserSpeak
    		Language
    		Pet
    	}
    
    	results := make([]Result, 0, 1)
    	DB.Select("users.*, user_speaks.*,  languages.*, pets.*").Table("users").Joins("JOIN user_speaks ON user_speaks.user_id = users.id").
    		Joins("JOIN languages ON languages.code = user_speaks.language_code").
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Jun 17 03:58:13 UTC 2024
    - 15K bytes
    - Viewed (0)
  3. tests/associations_has_many_test.go

    		Contents: []ItemContent{
    			{Name: "name", LanguageCode: "en"},
    			{Name: "ar name", LanguageCode: "ar"},
    		},
    	}
    	if err := tx.Create(&item).Error; err != nil {
    		t.Fatalf("failed to create items, got error: %v", err)
    	}
    
    	// test Replace
    	if err := tx.Model(&item).Association("Contents").Unscoped().Replace([]ItemContent{
    		{Name: "updated name", LanguageCode: "en"},
    		{Name: "ar updated name", LanguageCode: "ar"},
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 16K bytes
    - Viewed (0)
  4. tests/preload_suits_test.go

    		t.Error(err)
    	}
    
    	want := Level2{Value: "Bob", LanguageCode: "ru", Level1s: []Level1{
    		{Value: "ru", LanguageCode: "ru"},
    		{Value: "en", LanguageCode: "en"},
    	}}
    	if err := DB.Save(&want).Error; err != nil {
    		t.Error(err)
    	}
    
    	want2 := Level2{Value: "Tom", LanguageCode: "zh", Level1s: []Level1{
    		{Value: "zh", LanguageCode: "zh"},
    		{Value: "de", LanguageCode: "de"},
    	}}
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Fri Mar 18 05:38:46 UTC 2022
    - 30.3K bytes
    - Viewed (0)
  5. tests/create_test.go

    	}
    }
    
    func TestCreateWithAutoIncrementCompositeKey(t *testing.T) {
    	type CompositeKeyProduct struct {
    		ProductID    int `gorm:"primaryKey;autoIncrement:true;"` // primary key
    		LanguageCode int `gorm:"primaryKey;"`                    // primary key
    		Code         string
    		Name         string
    	}
    
    	if err := DB.Migrator().DropTable(&CompositeKeyProduct{}); err != nil {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Tue Mar 19 03:50:28 UTC 2024
    - 26.4K bytes
    - Viewed (0)
Back to top