Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestUpsertWithSave (0.14 sec)

  1. tests/upsert_test.go

    		} else if results[0].Name != lang.Name {
    			t.Errorf("should update name on conflict, but got name %+v", results[0].Name)
    		}
    	}
    }
    
    func TestUpsertWithSave(t *testing.T) {
    	langs := []Language{
    		{Code: "upsert-save-1", Name: "Upsert-save-1"},
    		{Code: "upsert-save-2", Name: "Upsert-save-2"},
    	}
    
    	if err := DB.Save(&langs).Error; err != nil {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Sep 05 07:39:19 UTC 2022
    - 11.4K bytes
    - Viewed (0)
Back to top