Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Omit (0.12 sec)

  1. tests/query_test.go

    		t.Fatal("expected errors to have occurred, but nothing happened")
    	}
    	if totalBatch != 0 {
    		t.Fatalf("incorrect total batch, expected: %v, got: %v", 0, totalBatch)
    	}
    
    	if result := DB.Omit("id").Where("name = ?", users[0].Name).FindInBatches(&results, 2, func(tx *gorm.DB, batch int) error {
    		totalBatch += batch
    		return nil
    	}); result.Error != gorm.ErrPrimaryKeyRequired {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Apr 25 12:22:53 GMT 2024
    - 49.8K bytes
    - Viewed (0)
Back to top