Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestBelongsToDefaultValue (0.17 sec)

  1. tests/associations_belongs_to_test.go

    	AssertAssociationCount(t, users[0], "Company", 0, "After Delete")
    	AssertAssociationCount(t, users[1], "Company", 1, "After other user Delete")
    }
    
    func TestBelongsToDefaultValue(t *testing.T) {
    	type Org struct {
    		ID string
    	}
    	type BelongsToUser struct {
    		OrgID string
    		Org   Org `gorm:"default:NULL"`
    	}
    
    	tx := DB.Session(&gorm.Session{})
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Oct 30 09:15:49 UTC 2023
    - 9.3K bytes
    - Viewed (0)
Back to top