Skip to content

Tracking Issue with quotes on unquoted alias name #36

@BidyadharM

Description

@BidyadharM

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.

Gorm issue: go-gorm/gorm#7565
Playground Issue: go-gorm/playground#826

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions