Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Seamon (0.18 sec)

  1. tests/associations_test.go

    	"gorm.io/gorm/schema"
    	. "gorm.io/gorm/utils/tests"
    )
    
    func AssertAssociationCount(t *testing.T, data interface{}, name string, result int64, reason string) {
    	if count := DB.Model(data).Association(name).Count(); count != result {
    		t.Fatalf("invalid %v count %v, expects: %v got %v", name, reason, result, count)
    	}
    
    	var newUser User
    	if user, ok := data.(User); ok {
    		DB.Find(&newUser, "id = ?", user.ID)
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Wed Feb 08 08:29:09 GMT 2023
    - 10.9K bytes
    - Viewed (0)
Back to top