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
      

        Activity

        Matt Janssen created issue -
        Matt Janssen made changes -
        Field Original Value New Value
        Status Open [ 1 ] Awaiting Feedback [ 10000 ]
        Gordon Forsythe made changes -
        Comment [ Anyone alive in there? ]
        Benjamin Eberlei made changes -
        Status Awaiting Feedback [ 10000 ] Open [ 1 ]
        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 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: