Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestSearchWithStruct (0.78 sec)

  1. tests/query_test.go

    	DB.Find(&results2, map[string]interface{}{"name": users[3].Name, "company_id": users[3].CompanyID})
    	if len(results2) != 1 {
    		t.Errorf("Search all records with inline multiple value map")
    	}
    }
    
    func TestSearchWithStruct(t *testing.T) {
    	dryRunDB := DB.Session(&gorm.Session{DryRun: true})
    
    	result := dryRunDB.Where(User{Name: "jinzhu"}).Find(&User{})
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Tue Jul 22 06:21:04 UTC 2025
    - 51K bytes
    - Viewed (0)
Back to top