Uploaded image for project: '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

          mattjanssen Matt Janssen created issue -
          mattjanssen Matt Janssen made changes -
          Field Original Value New Value
          Status Open [ 1 ] Awaiting Feedback [ 10000 ]
          baohx2000 Gordon Forsythe made changes -
          Comment [ Anyone alive in there? ]
          beberlei Benjamin Eberlei made changes -
          Status Awaiting Feedback [ 10000 ] Open [ 1 ]
          beberlei Benjamin Eberlei made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Fix Version/s 2.4 [ 10321 ]
          Fix Version/s 2.3.5 [ 10521 ]
          Resolution Fixed [ 1 ]
          ocramius Marco Pivetta made changes -
          Link This issue is referenced by DDC-3500 [ DDC-3500 ]

            People

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

              Dates

              • Created:
                Updated:
                Resolved: