Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for SaveAfterAssociations (0.16 sec)

  1. callbacks/callbacks.go

    	createCallback.Register("gorm:save_before_associations", SaveBeforeAssociations(true))
    	createCallback.Register("gorm:create", Create(config))
    	createCallback.Register("gorm:save_after_associations", SaveAfterAssociations(true))
    	createCallback.Register("gorm:after_create", AfterCreate)
    	createCallback.Match(enableTransaction).Register("gorm:commit_or_rollback_transaction", CommitOrRollbackTransaction)
    Registered: Sun Oct 27 09:35:08 UTC 2024
    - Last Modified: Wed Oct 27 23:56:55 UTC 2021
    - 3.3K bytes
    - Viewed (0)
  2. callbacks/associations.go

    						if saveAssociations(db, rel, rv, selectColumns, restricted, nil) == nil {
    							setupReferences(db.Statement.ReflectValue, rv)
    						}
    					}
    				}
    			}
    		}
    	}
    }
    
    func SaveAfterAssociations(create bool) func(db *gorm.DB) {
    	return func(db *gorm.DB) {
    		if db.Error == nil && db.Statement.Schema != nil {
    			selectColumns, restricted := db.Statement.SelectAndOmitColumns(create, !create)
    
    Registered: Sun Oct 27 09:35:08 UTC 2024
    - Last Modified: Tue Apr 11 03:06:13 UTC 2023
    - 14.3K bytes
    - Viewed (0)
Back to top