Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestUpdatesTableWithIgnoredValues (0.19 sec)

  1. tests/update_test.go

    	var result User
    	DB.First(&result, user.ID)
    
    	if result.Name != user.Name || result.Age != 100 {
    		t.Errorf("user's name should not be updated")
    	}
    }
    
    func TestUpdatesTableWithIgnoredValues(t *testing.T) {
    	type ElementWithIgnoredField struct {
    		Id           int64
    		Value        string
    		IgnoredField int64 `gorm:"-"`
    	}
    	DB.Migrator().DropTable(&ElementWithIgnoredField{})
    Registered: Sun Oct 27 09:35:08 UTC 2024
    - Last Modified: Mon Dec 04 03:50:58 UTC 2023
    - 30.3K bytes
    - Viewed (0)
Back to top