mirror of
https://gitee.com/johng/gf
synced 2026-07-07 06:15:15 +08:00
Update contrib/drivers/pgsql/pgsql_z_unit_upsert_test.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@ -219,8 +219,8 @@ func Test_FormatUpsert_NoOnConflict(t *testing.T) {
|
||||
}).Insert()
|
||||
t.AssertNil(err)
|
||||
|
||||
// Try Save without OnConflict - should fail for pgsql
|
||||
// PostgreSQL requires OnConflict() for Save() operations, unlike MySQL
|
||||
// Try Save without OnConflict and without primary key in data - should fail
|
||||
// because driver cannot auto-detect conflict columns when primary key is missing
|
||||
_, err = db.Model(table).Data(g.Map{
|
||||
// "id": 1,
|
||||
"passport": "no_conflict_user",
|
||||
|
||||
Reference in New Issue
Block a user