Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 21 of 21 for PRIMARY_KEY (0.09 sec)

  1. tests/query_test.go

    	}
    
    	AssertEqual(t, p, p2)
    }
    
    func TestStringPrimaryKeyForNumericValueStartingWithZero(t *testing.T) {
    	type AddressByZipCode struct {
    		ZipCode string `gorm:"primary_key"`
    		Address string
    	}
    
    	DB.Migrator().DropTable(&AddressByZipCode{})
    	if err := DB.AutoMigrate(&AddressByZipCode{}); err != nil {
    		t.Fatalf("failed to migrate, got error %v", err)
    	}
    
    Registered: Sun Oct 27 09:35:08 UTC 2024
    - Last Modified: Mon Jun 24 09:42:59 UTC 2024
    - 50.4K bytes
    - Viewed (0)
Back to top