Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestUpdateColumnsSkipsAssociations (0.5 sec)

  1. tests/update_test.go

    	var result2 User
    	DB.First(&result2, user.ID)
    
    	if result2.Name != user.Name || result2.Age == user.Age {
    		t.Errorf("Should only update users with name column")
    	}
    }
    
    func TestUpdateColumnsSkipsAssociations(t *testing.T) {
    	user := *GetUser("update_column_skips_association", Config{})
    	DB.Create(&user)
    
    	// Update a single field of the user and verify that the changed address is not stored.
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Dec 04 03:50:58 UTC 2023
    - 30.3K bytes
    - Viewed (0)
Back to top