Skip to content

Conversation

BidyadharM
Copy link

@BidyadharM BidyadharM commented Aug 22, 2025

Explain your user case and expected results

Testing with gorm-oracle
When the alias name is provided unquoted, the alias name used when generating the query should be unquoted as well.
For the below statement,

DB.Table("users u").Where("u.\"name\" = ?", "Bob").First(&result);

the generated query is:
SELECT * FROM users u WHERE u."name" = "Bob" AND "u"."deleted_at" IS NULL ORDER BY "u"."id" LIMIT 1

it should be:
SELECT * FROM users u WHERE u."name" = "Bob" AND u."deleted_at" IS NULL ORDER BY u."id" LIMIT 1

as oracle handles the quoted and unquoted indentifiers as separare entity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant