Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. tests/generics_test.go

    	}
    	if result.Name != u.Name || result.Company.Name != u.Company.Name {
    		t.Fatalf("Joins expected %s, got %+v", u.Name, result)
    	}
    
    	// Raw Subquery JOIN + WHERE
    	result, err = db.Joins(clause.LeftJoin.AssociationFrom("Company", gorm.G[Company](DB)).As("t"),
    		func(db gorm.JoinBuilder, joinTable clause.Table, curTable clause.Table) error {
    			if joinTable.Name != "t" {
    				t.Fatalf("Join table should be t, but got %v", joinTable.Name)
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Thu Sep 04 13:13:16 UTC 2025
    - 28K bytes
    - Viewed (0)
Back to top