/** * Create new unique pk as md5 hash and puts it to field root_id if this is * not a comment. * if pk consists of multiple columns, false is returned * @return boolean|string */ function getNewId() { $id = parent::getNewId(); if (!$this['root_id']) { $this['root_id'] = $id; } return $id; }