Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for update_callback (0.45 sec)

  1. tests/hooks_test.go

    	}
    
    	p2 := Product{Code: "update_callback", Price: 100}
    	DB.Save(&p2)
    
    	p2.Code = "dont_update"
    	if DB.Save(&p2).Error == nil {
    		t.Fatalf("An error from before update callbacks happened when update with invalid value")
    	}
    
    	if DB.Where("code = ?", "update_callback").First(&Product{}).Error != nil {
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Mon Jun 17 03:59:06 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  2. callbacks/callbacks.go

    	updateCallback := db.Callback().Update()
    	updateCallback.Match(enableTransaction).Register("gorm:begin_transaction", BeginTransaction)
    	updateCallback.Register("gorm:setup_reflect_value", SetupUpdateReflectValue)
    	updateCallback.Register("gorm:before_update", BeforeUpdate)
    	updateCallback.Register("gorm:save_before_associations", SaveBeforeAssociations(false))
    	updateCallback.Register("gorm:update", Update(config))
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Wed Oct 27 23:56:55 UTC 2021
    - 3.3K bytes
    - Viewed (0)
Back to top