Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for update_name_2 (0.17 sec)

  1. tests/hooks_test.go

    	err := DB.Model(&Product5{}).Where("id", p.ID).Update("name", "update_name_1").Error
    	if err != nil {
    		t.Fatalf("should update success, but got err %v", err)
    	}
    	if beforeUpdateCall != 1 {
    		t.Fatalf("before update should be called")
    	}
    
    	err = DB.Model(Product5{}).Where("id", p.ID).Update("name", "update_name_2").Error
    	if !errors.Is(err, gorm.ErrInvalidValue) {
    Registered: Sun Oct 27 09:35:08 UTC 2024
    - Last Modified: Mon Jun 17 03:59:06 UTC 2024
    - 16.7K bytes
    - Viewed (0)
Back to top