Skip to content

Generics API Joins() fails on Oracle due to hardcoded "AS" before table alias #7564

@norah-li

Description

@norah-li

GORM Playground Link

go-gorm/playground#825

Description

When using GORM generics Joins with a subquery and .As("t"), the generated SQL is:

LEFT JOIN (...) AS `t` ON ...

Oracle does not allow AS before table aliases. As a result, this SQL fails with a syntax error when running against Oracle DB.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions