Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2506

WITH Conditionals on Class Table Inheritance LEFT JOINs are inserted incorrectly

    Details

      Description

      The following JOIN

      JOIN c.ctiRelationship cti WITH cti.id IN (42)
      

      generates unexpected SQL

      LEFT JOIN class_base p1_ ON u1_.cti_id = p1_.id 
      LEFT JOIN class_child1 p2_ ON p1_.id = p2_.id
      LEFT JOIN class_child2 p3_ ON p1_.id = p3_.id AND (p1_.id IN (42)) 
      

      when it SHOULD be generating

      LEFT JOIN class_base p1_ ON u1_.cti_id = p1_.id AND (p1_.id IN (42)) 
      LEFT JOIN class_child1 p2_ ON p1_.id = p2_.id
      LEFT JOIN class_child2 p3_ ON p1_.id = p3_.id
      

        Issue Links

          Activity

            People

            • Assignee:
              Benjamin Eberlei
              Reporter:
              Matt Janssen
            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: