Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. callbacks/create.go

    				if isZero {
    					db.AddError(pkField.Set(db.Statement.Context, db.Statement.ReflectValue, insertID))
    				}
    			}
    		}
    	}
    }
    
    // AfterCreate after create hooks
    func AfterCreate(db *gorm.DB) {
    	if db.Error == nil && db.Statement.Schema != nil && !db.Statement.SkipHooks && (db.Statement.Schema.AfterSave || db.Statement.Schema.AfterCreate) {
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Apr 08 03:29:55 GMT 2024
    - 12.5K bytes
    - Viewed (0)
  2. tests/query_test.go

    		t.Errorf("incorrect total batch, expects: %v, got %v", 6, totalBatch)
    	}
    
    	var count int64
    	DB.Model(&User{}).Where("name = ?", "find_in_batches_new").Count(&count)
    	if count != 6 {
    		t.Errorf("incorrect count after update, expects: %v, got %v", 6, count)
    	}
    }
    
    func TestFindInBatchesWithOffsetLimit(t *testing.T) {
    	users := []User{
    		*GetUser("find_in_batches_with_offset_limit", Config{}),
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
Back to top