Bug #53224

Constructor in subclass breaks call chain leading to missing identifier / uuid

Added by Christian Jul Jensen almost 2 years ago. Updated almost 2 years ago.

Status:New Start date:2013-10-30
Priority:Should have Due date:
Assigned To:- % Done:

0%

Category:Object
Target version:-
PHP Version: Complexity:hard
Has patch:No Affected Flow version:Git master

Description

If a subclass in a class hierachy has constrcutor, the call chain of proxies constructors will be broken which will lead to problems in the persistance layer.

Example

class Parent - no constructor
\_ class Child - constructor 

will lead to

class Parent_Original - no constructor
\_ class Parent - constructor introduced by proxy
 \_ class Child_Original - constructor
  \_ class Child - constructor introduced by proxy

In this case the constructor call chain will stop at the Child_Original constructor.

The bug in the persistence layer, might only oocur in the case of single table inheritence.

A workaround for this is to add a parent::_construct() call at the end of the Child domain class' constructor method.

Also available in: Atom PDF