Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestAssociationNotNullClear (0.13 sec)

  1. tests/associations_test.go

    	if err := DB.Model(&user).Association("Invalid").Find(&user.Company).Error; err == nil {
    		t.Fatalf("should return errors for invalid association, but got nil")
    	}
    }
    
    func TestAssociationNotNullClear(t *testing.T) {
    	type Profile struct {
    		gorm.Model
    		Number   string
    		MemberID uint `gorm:"not null"`
    	}
    
    	type Member struct {
    		gorm.Model
    		Profiles []Profile
    	}
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Feb 08 08:29:09 UTC 2023
    - 10.9K bytes
    - Viewed (0)
Back to top