Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for update_column_02_newnew (0.12 sec)

  1. tests/update_test.go

    	DB.First(&user2, users[1].ID)
    	CheckUser(t, user1, *users[0])
    	CheckUser(t, user2, *users[1])
    
    	DB.Model(users[1]).UpdateColumn("name", "update_column_02_newnew").UpdateColumn("age", 19)
    	AssertEqual(t, lastUpdatedAt.UnixNano(), users[1].UpdatedAt.UnixNano())
    
    	if users[1].Name != "update_column_02_newnew" {
    		t.Errorf("user 2's name should be updated, but got %v", users[1].Name)
    	}
    
    	if users[1].Age != 19 {
    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