Doctrine 1
  1. Doctrine 1
  2. DC-686

postHydrate listener isn't called for related records

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.2.2
    • Fix Version/s: None
    • Component/s: Record
    • Labels:
      None
    • Environment:
      Debian

      Description

      I have model A which has a one-to-one relationship with model B. They both have a listener on them which does an action on postHydrate. When I load model A, the postHydrate is called successfully. However when I then load the related model B (via $oMyModelA->B; or whatever), the listener is not called. This is the same when using the hook on the model - A::postHydrate() is called but B::postHydrate() is not.

      Unit test demonstrating this bug is attached.

        Activity

        Hide
        Ben Davies added a comment -

        This is invalid.
        In the test case:

        $r->Related->save();
        

        doesn't create a blank record, thus there is never a relation to postHydrate

        Show
        Ben Davies added a comment - This is invalid. In the test case: $r->Related->save(); doesn't create a blank record, thus there is never a relation to postHydrate

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Cameron Ross
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: