Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for Preload (0.26 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 {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Sat Feb 18 01:20:29 UTC 2023
    - 15.9K bytes
    - Viewed (0)
Back to top