- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for OmitUser1 (0.16 sec)
-
tests/query_test.go
t.Fatalf("Build Select with u.*, but got %v", r.Statement.SQL.String()) } } func TestOmit(t *testing.T) { user := User{Name: "OmitUser1", Age: 20} DB.Save(&user) var result User DB.Where("name = ?", user.Name).Omit("name").Find(&result) if result.ID == 0 { t.Errorf("Should not have ID because only selected name, %+v", result.ID) }
Registered: Sun Nov 03 09:35:10 UTC 2024 - Last Modified: Mon Jun 24 09:42:59 UTC 2024 - 50.4K bytes - Viewed (0)