/** * Fetch Mantelzorgers which references this OverlegTpPlan. Will return null in case reference is invalid. * `overleg_tp_plan`.`persoon` -> `mantelzorgers`.`id` * * @param PDO $db a PDO Database instance * @param array $sort array of DSC instances * @return Mantelzorgers */ public function fetchMantelzorgers(PDO $db, $sort = null) { $filter = array(Mantelzorgers::FIELD_ID => $this->getPersoon()); $result = Mantelzorgers::findByFilter($db, $filter, true, $sort); return empty($result) ? null : $result[0]; }
/** * Fetch Mantelzorgers's which this Persoon references. * `persoon`.`id` -> `mantelzorgers`.`id` * * @param PDO $db a PDO Database instance * @param array $sort array of DSC instances * @return Mantelzorgers[] */ public function fetchMantelzorgersCollection(PDO $db, $sort = null) { $filter = array(Mantelzorgers::FIELD_ID => $this->getId()); return Mantelzorgers::findByFilter($db, $filter, true, $sort); }