DDC-276: Left join using DQL generates a SQL Inner Join #344

Closed
opened 2026-01-22 12:35:30 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Jan 26, 2010).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user kidh0:

I tried to execute the follow DQL:

$this->_em->createQueryBuilder()
                    ->select('c1,c2, c3')
                    ->from('Class1, 'c1')
                    ->innerJoin('c1.class2', 'c2')
                    ->leftJoin('c1.class3', 'c3'); 

The class 3 extends a abstract class.

It generates the follow SQL:

SELECT ...
FROM   class1 c1_
       INNER JOIN classe2 c2_
        ...
       LEFT JOIN classe3  c3_
        ...
       INNER JOIN abstract*class3 ac3*
        ...

It breaks my query, 'cause there is one register in class1 but no register in class3, but since it generates a INNER JOIN, I brings no register.

Originally created by @doctrinebot on GitHub (Jan 26, 2010). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user kidh0: I tried to execute the follow DQL: ``` $this->_em->createQueryBuilder() ->select('c1,c2, c3') ->from('Class1, 'c1') ->innerJoin('c1.class2', 'c2') ->leftJoin('c1.class3', 'c3'); ``` The class 3 extends a abstract class. It generates the follow SQL: ``` SELECT ... FROM class1 c1_ INNER JOIN classe2 c2_ ... LEFT JOIN classe3 c3_ ... INNER JOIN abstract*class3 ac3* ... ``` It breaks my query, 'cause there is one register in class1 but no register in class3, but since it generates a INNER JOIN, I brings no register.
admin added the Bug label 2026-01-22 12:35:30 +01:00
admin closed this issue 2026-01-22 12:35:31 +01:00
Author
Owner

@doctrinebot commented on GitHub (Feb 1, 2010):

Comment created by @beberlei:

We need a reproducable test-case, this is to abstract to be any help in finding the root cause.

@doctrinebot commented on GitHub (Feb 1, 2010): Comment created by @beberlei: We need a reproducable test-case, this is to abstract to be any help in finding the root cause.
Author
Owner

@doctrinebot commented on GitHub (Feb 7, 2010):

Comment created by @beberlei:

It seems this is fixed in trunk.

@doctrinebot commented on GitHub (Feb 7, 2010): Comment created by @beberlei: It seems this is fixed in trunk.
Author
Owner

@doctrinebot commented on GitHub (Feb 7, 2010):

Issue was closed with resolution "Cannot Reproduce"

@doctrinebot commented on GitHub (Feb 7, 2010): Issue was closed with resolution "Cannot Reproduce"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#344