Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 2 of 2 for update_callback (0.28 seconds)

  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 {
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Mon Jun 17 03:59:06 GMT 2024
    - 16.7K bytes
    - Click Count (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))
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Sat Mar 21 11:35:55 GMT 2026
    - 3.4K bytes
    - Click Count (0)
Back to Top