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:
John Guo
2025-12-08 14:54:48 +08:00
committed by GitHub
parent ba44475765
commit 111f8b3264

View File

@ -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",