Skip to content

Conversation

jawad-arb123
Copy link
Member

Description

Fixes incorrect soft-delete table reference when performing updates with a custom table name (via clause.Update{Table: ...}). Fixes #81

Result

-- generated SQL : UPDATE "custom_update_table" SET "updated_at"='2025-10-08 23:16:47.41',"name"='patched',"age"=99 WHERE id = 200 AND "custom_update_table"."deleted_at" IS NULL

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Oct 8, 2025
}
}

func TestUpdateWithCustomTableName(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the issue! Could you please uncomment the related test in TestToSQL in tests/sql_builder_test.go as well? Thanks a lot!

Copy link
Contributor

@shelly-li-sl shelly-li-sl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the issue!

@ting-lan-wang ting-lan-wang merged commit 5de56b6 into main Oct 10, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect table name when setting explicit table name via clause.Update

3 participants