Skip to content

Conversation

@norah-li
Copy link

Reproduce an issue when using generics Joins with subquery + As("t")

Generated SQL:

SELECT `users`.`id`,`users`.`created_at`,`users`.`updated_at`,`users`.`deleted_at`,`users`.`name`,`users`.`age`,`users`.`birthday`,`users`.`company_id`,`users`.`manager_id`,`users`.`active`,`t`.`id` AS `t__id`,`t`.`name` AS `t__name` 
FROM `users` 
LEFT JOIN (SELECT `companies`.`id`,`companies`.`name` FROM `companies` Company) AS `t` ON `t`."name" = ? WHERE `users`.`name` = ? AND `users`.`deleted_at` IS NULL

Oracle does not allow AS before table/subquery aliases, so this SQL is invalid.

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