Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for ManagerID (0.09 sec)

  1. schema/schema_test.go

    		{Name: "CompanyID", DBName: "company_id", BindNames: []string{"CompanyID"}, DataType: schema.Int, Size: 64},
    		{Name: "ManagerID", DBName: "manager_id", BindNames: []string{"ManagerID"}, DataType: schema.Uint, Size: 64},
    		{Name: "Active", DBName: "active", BindNames: []string{"Active"}, DataType: schema.Bool},
    	}
    
    	for i := range fields {
    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

    }
    
    func TestJoinsPreload_Issue7013(t *testing.T) {
    	manager := &User{Name: "Manager"}
    	DB.Create(manager)
    
    	var userIDs []uint
    	for i := 0; i < 21; i++ {
    		user := &User{Name: fmt.Sprintf("User%d", i), ManagerID: &manager.ID}
    		DB.Create(user)
    		userIDs = append(userIDs, user.ID)
    	}
    
    	var entries []User
    	assert.NotPanics(t, func() {
    		assert.NoError(t,
    			DB.Debug().Preload("Manager.Team").
    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/scan_test.go

    			Name:    "TestScanToEmbedded_1_m1",
    			Manager: &User{Name: "TestScanToEmbedded_1_m1_m1"},
    		},
    	}
    	DB.Create(&user)
    
    	type UserScan struct {
    		ID        uint
    		Name      string
    		ManagerID *uint
    	}
    	var user2 UserScan
    	err := DB.Raw("SELECT * FROM users INNER JOIN users Manager ON users.manager_id = Manager.id WHERE users.id = ?", user.ID).Scan(&user2).Error
    	AssertEqual(t, err, nil)
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Jun 12 10:57:36 UTC 2024
    - 10.9K bytes
    - Viewed (0)
Back to top