Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for p1 (0.36 sec)

  1. tests/query_test.go

    	if err := DB.AutoMigrate(&CustomizedTypePrimaryKey{}); err != nil {
    		t.Fatalf("failed to migrate, got error %v", err)
    	}
    
    	p1 := CustomizedTypePrimaryKey{Name: "p1"}
    	p2 := CustomizedTypePrimaryKey{Name: "p2"}
    	p3 := CustomizedTypePrimaryKey{Name: "p3"}
    	DB.Create(&p1)
    	DB.Create(&p2)
    	DB.Create(&p3)
    
    	var p CustomizedTypePrimaryKey
    
    	if err := DB.First(&p, p2.ID).Error; err != nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
Back to top