Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestInnerJoins (0.09 sec)

  1. tests/joins_test.go

    	DB.Model(&User{}).Joins("NamedPet").Joins("Account").First(&user3, user.ID)
    	if user3.NamedPet != nil || user2.Account.ID != 0 {
    		t.Fatalf("joins NamedPet and Account should not empty:%v", user2)
    	}
    }
    
    func TestInnerJoins(t *testing.T) {
    	user := *GetUser("inner-joins-1", Config{Company: true, Manager: true, Account: true, NamedPet: false})
    
    	DB.Create(&user)
    
    	var user2 User
    	var err error
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Jun 17 03:58:13 UTC 2024
    - 15K bytes
    - Viewed (0)
Back to top