mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #6475] Fix invalid sql generated for CTI JOINs when INNER JOIN'ing with a WITH clause
#9993
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/doctrine/orm/pull/6475
State: closed
Merged: No
See #6464 for a detailed example of the problem.
For a query like
... where
GH6464Authoris a CTI entity, the sql generation currently generates two JOINs (correct) and attaches both join conditions to the latter JOIN. This works with MySQL and SQLite, however fails on PostgreSQL.This patch
SqlWalkerthat makes it output a nested JOINSelectSqlGenerationTestto reflect the change (and make those SQL statements valid -- on PostgreSQL)