Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for assoc_m2m_append_map (0.06 sec)

  1. tests/associations_test.go

    	}
    
    	AssertEqual(t, result, user)
    }
    
    // Ensure Association.Append/Replace supports map for many2many
    func TestAssociationMany2ManyAppendMap(t *testing.T) {
    	user := *GetUser("assoc_m2m_append_map", Config{})
    	if err := DB.Create(&user).Error; err != nil {
    		t.Fatalf("create user: %v", err)
    	}
    
    	// Append single map
    	if err := DB.Model(&user).Association("Languages").Append(map[string]interface{}{
    Registered: Sun Dec 28 09:35:17 UTC 2025
    - Last Modified: Fri Sep 12 04:33:27 UTC 2025
    - 13.3K bytes
    - Viewed (0)
Back to top