Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: Git Master
    • Fix Version/s: 2.1.5, 2.2
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None
    • Environment:
      ubuntu php 5.3.8

      Description

      One to one entity over populated

      1. 1548.php
        1 kB
        Asmir Mustafic

        Activity

        Hide
        Asmir Mustafic added a comment -

        I have created a test.

        the bug may be in \Doctrine\ORM\Internal\Hydration\AbstractHydrator at line 246.

        i think...

        remove
        if ( ! isset($rowData[$dqlAlias][$cache[$key]['fieldName']]) || $value !== null) {

        and replace with :

        if ( ! isset($rowData[$dqlAlias][$cache[$key]['fieldName']]) && $value !== null) {

        this will fix the bug

        Show
        Asmir Mustafic added a comment - I have created a test. the bug may be in \Doctrine\ORM\Internal\Hydration\AbstractHydrator at line 246. i think... remove if ( ! isset($rowData [$dqlAlias] [$cache [$key] ['fieldName'] ]) || $value !== null) { and replace with : if ( ! isset($rowData [$dqlAlias] [$cache [$key] ['fieldName'] ]) && $value !== null) { this will fix the bug
        Hide
        Guilherme Blanco added a comment -

        Fixed since this commit: https://github.com/doctrine/doctrine2/commit/68663fac4b5619643b8a140d6bbe7031e4fa2ad5

        Thanks a lot for the report and patch! =D

        Show
        Guilherme Blanco added a comment - Fixed since this commit: https://github.com/doctrine/doctrine2/commit/68663fac4b5619643b8a140d6bbe7031e4fa2ad5 Thanks a lot for the report and patch! =D
        Hide
        Benjamin Eberlei added a comment -

        Update fix version, this was merged into 2.1.5

        Show
        Benjamin Eberlei added a comment - Update fix version, this was merged into 2.1.5

          People

          • Assignee:
            Guilherme Blanco
            Reporter:
            Asmir Mustafic
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: