public static function getParents() { $parents = array(); foreach (VDepartmentChildPeer::doSelect(new Criteria()) as $d) { if (count($d->getDepartmentsRelatedByParent()) > 0) { $parents[] = $d->getId(); } } return $parents; }
public static function retrieveByPKs($pks, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $objs = null; if (empty($pks)) { $objs = array(); } else { $criteria = new Criteria(); $criteria->add(VDepartmentChildPeer::ID, $pks, Criteria::IN); $objs = VDepartmentChildPeer::doSelect($criteria, $con); } return $objs; }