Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for 100 (0.15 sec)

  1. tests/hooks_test.go

    	p := Product{Code: "Invalid", Price: 100}
    	if DB.Save(&p).Error == nil {
    		t.Fatalf("An error from before create callbacks happened when create with invalid value")
    	}
    
    	if DB.Where("code = ?", "Invalid").First(&Product{}).Error == nil {
    		t.Fatalf("Should not save record that have errors")
    	}
    
    	if DB.Save(&Product{Code: "dont_save", Price: 100}).Error == nil {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Feb 18 01:20:29 GMT 2023
    - 15.9K bytes
    - Viewed (0)
Back to top