Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestHasManyAssociationForSlice (0.12 sec)

  1. tests/associations_has_many_test.go

    	if err := DB.Model(&user2).Association("Team").Clear(); err != nil {
    		t.Errorf("Error happened when clear Team, got %v", err)
    	}
    
    	AssertAssociationCount(t, user2, "Team", 0, "after clear")
    }
    
    func TestHasManyAssociationForSlice(t *testing.T) {
    	users := []User{
    		*GetUser("slice-hasmany-1", Config{Pets: 2}),
    		*GetUser("slice-hasmany-2", Config{Pets: 0}),
    		*GetUser("slice-hasmany-3", Config{Pets: 4}),
    	}
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 16K bytes
    - Viewed (0)
Back to top