Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for SetupUpdateReflectValue (0.11 sec)

  1. 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 Nov 03 09:35:10 UTC 2024
    - Last Modified: Wed Oct 27 23:56:55 UTC 2021
    - 3.3K bytes
    - Viewed (0)
  2. callbacks/update.go

    package callbacks
    
    import (
    	"reflect"
    	"sort"
    
    	"gorm.io/gorm"
    	"gorm.io/gorm/clause"
    	"gorm.io/gorm/schema"
    	"gorm.io/gorm/utils"
    )
    
    func SetupUpdateReflectValue(db *gorm.DB) {
    	if db.Error == nil && db.Statement.Schema != nil {
    		if !db.Statement.ReflectValue.CanAddr() || db.Statement.Model != db.Statement.Dest {
    			db.Statement.ReflectValue = reflect.ValueOf(db.Statement.Model)
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Mar 18 05:44:55 UTC 2024
    - 9.4K bytes
    - Viewed (0)
Back to top