Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for company100_with_primarykey (0.25 sec)

  1. tests/create_test.go

    func TestFirstOrCreateWithPrimaryKey(t *testing.T) {
    	company := Company{ID: 100, Name: "company100_with_primarykey"}
    	DB.FirstOrCreate(&company)
    
    	if company.ID != 100 {
    		t.Errorf("invalid primary key after creating, got %v", company.ID)
    	}
    
    	companies := []Company{
    		{ID: 101, Name: "company101_with_primarykey"},
    		{ID: 102, Name: "company102_with_primarykey"},
    	}
    	DB.Create(&companies)
    
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Mon Jul 21 09:55:20 UTC 2025
    - 26.8K bytes
    - Viewed (0)
Back to top