Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for Sait (0.14 sec)

  1. tests/preload_test.go

    			defer wg.Done()
    			var user2 []User
    			tx := DB.Where("id = ?", 1).Session(&gorm.Session{})
    
    			if err := tx.Preload("Team").Find(&user2).Error; err != nil {
    				t.Error(err)
    			}
    		}()
    	}
    	wg.Wait()
    }
    
    func TestPreloadWithDiffModel(t *testing.T) {
    	user := *GetUser("preload_with_diff_model", Config{Account: true})
    
    	if err := DB.Create(&user).Error; err != nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:21:03 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  2. schema/schema.go

    	} else {
    		schemaCacheKey = modelType
    	}
    
    	// Load exist schema cache, return if exists
    	if v, ok := cacheStore.Load(schemaCacheKey); ok {
    		s := v.(*Schema)
    		// Wait for the initialization of other goroutines to complete
    		<-s.initialized
    		return s, s.err
    	}
    
    	modelValue := reflect.New(modelType)
    	tableName := namer.TableName(modelType.Name())
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Tue Oct 10 06:50:29 GMT 2023
    - 13.7K bytes
    - Viewed (0)
  3. tests/associations_many2many_test.go

    		wg.Add(1)
    		go func(user User, language Language) {
    			err := db.Model(&user).Association("Languages").Append(&language)
    			AssertEqual(t, err, nil)
    
    			wg.Done()
    		}(user, languages[i])
    	}
    	wg.Wait()
    
    	var find User
    	err = db.Preload(clause.Associations).Where("id = ?", user.ID).First(&find).Error
    	AssertEqual(t, err, nil)
    	AssertAssociationCount(t, find, "Languages", int64(count), "after concurrent append")
    }
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Jun 10 13:05:19 GMT 2023
    - 13.2K bytes
    - Viewed (0)
Back to top