Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2032

DQL fails for Joined Inheritance with Associations on child classes

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Invalid
    • Affects Version/s: 2.3
    • Fix Version/s: None
    • Component/s: DQL
    • Security Level: All
    • Labels:
    • Environment:
      Windows XAMPP

      Description

      I have the following object hierarchy:

      Clazz A with Joined Table Inheritance
      Clazz B extends A
      Clazz C extends A with an association (n:1) to D
      Clazz D

      I am doing a DQL query 'SELECT u FROM A u'

      If I just have As and Bs in the DB everything is fine. But I there is a C in there I get the following error:

      Notice: Trying to get property of non-object in X:\Zend_Workspace\goalio_application\vendor\doctrine\orm\lib\Doctrine\ORM\Internal\Hydration\ObjectHydrator.php on line 479

      Fatal error: Call to a member function fetch() on a non-object in X:\Zend_Workspace\goalio_application\vendor\doctrine\orm\lib\Doctrine\ORM\Internal\Hydration\ObjectHydrator.php on line 148

      When I debug the _rsm of the Hydrator is null when trying to hydrate the row for C.

      Any ideas?

        Activity

        Philipp Dobrigkeit created issue -
        Philipp Dobrigkeit made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Philipp Dobrigkeit
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: