fix query to use proper identifier for search

This commit is contained in:
Jim Lambert 2020-02-14 10:05:46 -05:00
parent 89eb0d4da6
commit 2a7d9648ca

View File

@ -761,7 +761,7 @@ func TestFindOrCreate(t *testing.T) {
t.Errorf("embedded struct email should be saved") t.Errorf("embedded struct email should be saved")
} }
if DB.Where("email = ?", "1231231231").First(&CreditCard{}).RecordNotFound() { if DB.Where("\"number\" = ?", "1231231231").First(&CreditCard{}).RecordNotFound() {
t.Errorf("embedded struct credit card should be saved") t.Errorf("embedded struct credit card should be saved")
} }
} }