Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2245

EntityManager#getReference returns NULL on SINGLE_TABLE inheritance

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 2.3.2
    • Fix Version/s: None
    • Component/s: ORM
    • Labels:
      None

      Description

      When EntityManager#getReference is called with SINGLE_TABLE inherited entity, it tries to get a loaded entity by calling unitOfWork->tryGetById($sortedId, $class->rootEntityName). The call may return an entity object of root entity class which is not what is asked, then it ends up returning NULL instead of going further.

        Activity

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Masaki Fujimoto
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: