Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Preloads (0.36 sec)

  1. tests/hooks_test.go

    		t.Errorf("should find product, but got error %v", err)
    	}
    
    	var productWithItem Product4
    	if err := DB.Session(&gorm.Session{SkipHooks: true}).Preload("Item").First(&productWithItem, "name = ?", product.Name).Error; err != nil {
    		t.Errorf("should find product, but got error %v", err)
    	}
    
    	if productWithItem.Item.AfterFindCallTimes != 0 {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Sat Feb 18 01:20:29 GMT 2023
    - 15.9K bytes
    - Viewed (0)
Back to top