Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2759

ArrayHydration: Only first entity in OneToMany association is hydrated

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3, Git Master
    • Fix Version/s: 2.3.5, 2.5, 2.4.1
    • Component/s: ORM
    • Security Level: All
    • Labels:
    • Environment:
      Windows, PHP 5.4.17

      Description

      When calling `getArrayResult()` on a query, the result is not being hydrated correctly. Where there should be multiple entities appearing (for a OneToMany association), only the first entity appears in the array.

      git bisect suggests this was introduced in https://github.com/doctrine/doctrine2/commit/08e38858ed36b13b2655f2971308361714798596

      I've attached a test case with a simplified schema that fails on the above commit, but passes on the commit immediately previous.

      If you need any further info, please let me know.

      EDIT: PR for failing test case: https://github.com/doctrine/doctrine2/pull/827

        Activity

          People

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

            Dates

            • Created:
              Updated:
              Resolved: