public static function doSelectJoinAllExceptEmployee(Criteria $c, $con = null) { $c = clone $c; if ($c->getDbName() == Propel::getDefaultDB()) { $c->setDbName(self::DATABASE_NAME); } SubjectAccalLectorPeer::addSelectColumns($c); $startcol2 = SubjectAccalLectorPeer::NUM_COLUMNS - SubjectAccalLectorPeer::NUM_LAZY_LOAD_COLUMNS + 1; SubjectAccalPeer::addSelectColumns($c); $startcol3 = $startcol2 + SubjectAccalPeer::NUM_COLUMNS; $c->addJoin(SubjectAccalLectorPeer::SUBJECT_ACCAL_ID, SubjectAccalPeer::ID); $rs = BasePeer::doSelect($c, $con); $results = array(); while ($rs->next()) { $omClass = SubjectAccalLectorPeer::getOMClass(); $cls = Propel::import($omClass); $obj1 = new $cls(); $obj1->hydrate($rs); $omClass = SubjectAccalPeer::getOMClass(); $cls = Propel::import($omClass); $obj2 = new $cls(); $obj2->hydrate($rs, $startcol2); $newObject = true; for ($j = 0, $resCount = count($results); $j < $resCount; $j++) { $temp_obj1 = $results[$j]; $temp_obj2 = $temp_obj1->getSubjectAccal(); if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) { $newObject = false; $temp_obj2->addSubjectAccalLector($obj1); break; } } if ($newObject) { $obj2->initSubjectAccalLectors(); $obj2->addSubjectAccalLector($obj1); } $results[] = $obj1; } return $results; }