Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestSupportedDialectorWithErrForeignKeyViolated (0.7 sec)

  1. tests/error_translator_test.go

    	}
    
    	err = db.Create(&City{Name: "Kabul"}).Error
    	if !errors.Is(err, gorm.ErrDuplicatedKey) {
    		t.Fatalf("expected err: %v got err: %v", gorm.ErrDuplicatedKey, err)
    	}
    }
    
    func TestSupportedDialectorWithErrForeignKeyViolated(t *testing.T) {
    	tidbSkip(t, "not support the foreign key feature")
    
    	type City struct {
    		gorm.Model
    		Name string `gorm:"unique"`
    	}
    
    	type Museum struct {
    		gorm.Model
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Wed Jul 12 13:21:22 GMT 2023
    - 3.1K bytes
    - Viewed (0)
Back to top