Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for AfterAppend (0.53 sec)

  1. tests/associations_has_one_test.go

    	}
    
    	if account.ID == 0 {
    		t.Fatalf("Account's ID should be created")
    	}
    
    	user.Account = account
    	CheckUser(t, user2, user)
    
    	AssertAssociationCount(t, user, "Account", 1, "AfterAppend")
    
    	// Replace
    	account2 := Account{Number: "account-has-one-replace"}
    
    	if err := DB.Model(&user2).Association("Account").Replace(&account2); err != nil {
    		t.Fatalf("Error happened when append Account, got %v", err)
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Wed Jun 12 10:49:45 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  2. tests/associations_belongs_to_test.go

    	user.Company = company
    	user.Manager = manager
    	user.CompanyID = &company.ID
    	user.ManagerID = &manager.ID
    	CheckUser(t, user2, user)
    
    	AssertAssociationCount(t, user2, "Company", 1, "AfterAppend")
    	AssertAssociationCount(t, user2, "Manager", 1, "AfterAppend")
    
    	// Replace
    	company2 := Company{Name: "company-belongs-to-replace"}
    	manager2 := GetUser("manager-belongs-to-replace", Config{})
    
    Registered: Sun Sep 07 09:35:13 UTC 2025
    - Last Modified: Mon Oct 30 09:15:49 UTC 2023
    - 9.3K bytes
    - Viewed (0)
Back to top