you should reset the property instead of unsetting it from the class definition. ``unset($this->children);`` is not equivalent to ``$this->children = null;``