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.
This is an upstream issue in GORM.
GORM issue: go-gorm/gorm#7564
Playground repo: go-gorm/playground#825