GORM Playground Link
go-gorm/playground#826
Description
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.