Esempio n. 1
0
 public static function doSelectJoinAll(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     CounselingSpecPeer::addSelectColumns($c);
     $startcol2 = CounselingSpecPeer::NUM_COLUMNS - CounselingSpecPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = CounselingSpecPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $results[] = $obj1;
     }
     return $results;
 }
 public static function doSelectJoinAllExceptSubjectCurr(Criteria $c, $con = null)
 {
     $c = clone $c;
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     CounselingRaportPeer::addSelectColumns($c);
     $startcol2 = CounselingRaportPeer::NUM_COLUMNS - CounselingRaportPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     StudentAccalPeer::addSelectColumns($c);
     $startcol3 = $startcol2 + StudentAccalPeer::NUM_COLUMNS;
     CounselingSpecPeer::addSelectColumns($c);
     $startcol4 = $startcol3 + CounselingSpecPeer::NUM_COLUMNS;
     $c->addJoin(CounselingRaportPeer::STUDENT_ACCAL_ID, StudentAccalPeer::ID);
     $c->addJoin(CounselingRaportPeer::COUNSELING_SPEC_ID, CounselingSpecPeer::ID);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = CounselingRaportPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         $omClass = StudentAccalPeer::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->getStudentAccal();
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addCounselingRaport($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj2->initCounselingRaports();
             $obj2->addCounselingRaport($obj1);
         }
         $omClass = CounselingSpecPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj3 = new $cls();
         $obj3->hydrate($rs, $startcol3);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj3 = $temp_obj1->getCounselingSpec();
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addCounselingRaport($obj1);
                 break;
             }
         }
         if ($newObject) {
             $obj3->initCounselingRaports();
             $obj3->addCounselingRaport($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }