/**
  * Selects a collection of Profile objects pre-filled with all related objects.
  *
  * @return array Array of Profile objects.
  * @throws PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function doSelectJoinAll(Criteria $c, $con = null)
 {
     $c = clone $c;
     // Set the correct dbName if it has not been overridden
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     ProfilePeer::addSelectColumns($c);
     $startcol2 = ProfilePeer::NUM_COLUMNS - ProfilePeer::NUM_LAZY_LOAD_COLUMNS + 1;
     AgentPeer::addSelectColumns($c, 'a1');
     $startcol3 = $startcol2 + AgentPeer::NUM_COLUMNS;
     $c->addJoin(ProfilePeer::AGENT_ID, AgentPeer::alias('a1', AgentPeer::ID));
     $c->addAlias('a1', AgentPeer::TABLE_NAME);
     UserPeer::addSelectColumns($c, 'a2');
     $startcol4 = $startcol3 + UserPeer::NUM_COLUMNS;
     $c->addJoin(ProfilePeer::CREATED_BY, UserPeer::alias('a2', UserPeer::ID));
     $c->addAlias('a2', UserPeer::TABLE_NAME);
     UserPeer::addSelectColumns($c, 'a3');
     $startcol5 = $startcol4 + UserPeer::NUM_COLUMNS;
     $c->addJoin(ProfilePeer::UPDATED_BY, UserPeer::alias('a3', UserPeer::ID));
     $c->addAlias('a3', UserPeer::TABLE_NAME);
     UserPeer::addSelectColumns($c, 'a4');
     $startcol6 = $startcol5 + UserPeer::NUM_COLUMNS;
     $c->addJoin(ProfilePeer::DELETED_BY, UserPeer::alias('a4', UserPeer::ID));
     $c->addAlias('a4', UserPeer::TABLE_NAME);
     UserPeer::addSelectColumns($c, 'a5');
     $startcol7 = $startcol6 + UserPeer::NUM_COLUMNS;
     $c->addJoin(ProfilePeer::CHILD_UPDATED_BY, UserPeer::alias('a5', UserPeer::ID));
     $c->addAlias('a5', UserPeer::TABLE_NAME);
     StatusPeer::addSelectColumns($c, 'a6');
     $startcol8 = $startcol7 + StatusPeer::NUM_COLUMNS;
     $c->addJoin(ProfilePeer::STATUS_ID, StatusPeer::alias('a6', StatusPeer::ID));
     $c->addAlias('a6', StatusPeer::TABLE_NAME);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = ProfilePeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         // Add objects for joined Agent rows
         $omClass = AgentPeer::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->getAgent();
             // CHECKME
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addProfile($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj2->initProfiles();
             $obj2->addProfile($obj1);
         }
         // Add objects for joined User rows
         $omClass = UserPeer::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->getUserRelatedByCreatedBy();
             // CHECKME
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addProfileRelatedByCreatedBy($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj3->initProfilesRelatedByCreatedBy();
             $obj3->addProfileRelatedByCreatedBy($obj1);
         }
         // Add objects for joined User rows
         $omClass = UserPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj4 = new $cls();
         $obj4->hydrate($rs, $startcol4);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj4 = $temp_obj1->getUserRelatedByUpdatedBy();
             // CHECKME
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addProfileRelatedByUpdatedBy($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj4->initProfilesRelatedByUpdatedBy();
             $obj4->addProfileRelatedByUpdatedBy($obj1);
         }
         // Add objects for joined User rows
         $omClass = UserPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj5 = new $cls();
         $obj5->hydrate($rs, $startcol5);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj5 = $temp_obj1->getUserRelatedByDeletedBy();
             // CHECKME
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addProfileRelatedByDeletedBy($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj5->initProfilesRelatedByDeletedBy();
             $obj5->addProfileRelatedByDeletedBy($obj1);
         }
         // Add objects for joined User rows
         $omClass = UserPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj6 = new $cls();
         $obj6->hydrate($rs, $startcol6);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj6 = $temp_obj1->getUserRelatedByChildUpdatedBy();
             // CHECKME
             if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj6->addProfileRelatedByChildUpdatedBy($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj6->initProfilesRelatedByChildUpdatedBy();
             $obj6->addProfileRelatedByChildUpdatedBy($obj1);
         }
         // Add objects for joined Status rows
         $omClass = StatusPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj7 = new $cls();
         $obj7->hydrate($rs, $startcol7);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj7 = $temp_obj1->getStatus();
             // CHECKME
             if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj7->addProfile($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj7->initProfiles();
             $obj7->addProfile($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
 /**
  * Selects a collection of SchemaPropertyElementHistory objects pre-filled with all related objects.
  *
  * @return array Array of SchemaPropertyElementHistory objects.
  * @throws PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function doSelectJoinAll(Criteria $c, $con = null)
 {
     $c = clone $c;
     // Set the correct dbName if it has not been overridden
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     SchemaPropertyElementHistoryPeer::addSelectColumns($c);
     $startcol2 = SchemaPropertyElementHistoryPeer::NUM_COLUMNS - SchemaPropertyElementHistoryPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     UserPeer::addSelectColumns($c, 'a1');
     $startcol3 = $startcol2 + UserPeer::NUM_COLUMNS;
     $c->addJoin(SchemaPropertyElementHistoryPeer::CREATED_USER_ID, UserPeer::alias('a1', UserPeer::ID));
     $c->addAlias('a1', UserPeer::TABLE_NAME);
     SchemaPropertyElementPeer::addSelectColumns($c, 'a2');
     $startcol4 = $startcol3 + SchemaPropertyElementPeer::NUM_COLUMNS;
     $c->addJoin(SchemaPropertyElementHistoryPeer::SCHEMA_PROPERTY_ELEMENT_ID, SchemaPropertyElementPeer::alias('a2', SchemaPropertyElementPeer::ID));
     $c->addAlias('a2', SchemaPropertyElementPeer::TABLE_NAME);
     SchemaPropertyPeer::addSelectColumns($c, 'a3');
     $startcol5 = $startcol4 + SchemaPropertyPeer::NUM_COLUMNS;
     $c->addJoin(SchemaPropertyElementHistoryPeer::SCHEMA_PROPERTY_ID, SchemaPropertyPeer::alias('a3', SchemaPropertyPeer::ID));
     $c->addAlias('a3', SchemaPropertyPeer::TABLE_NAME);
     SchemaPeer::addSelectColumns($c, 'a4');
     $startcol6 = $startcol5 + SchemaPeer::NUM_COLUMNS;
     $c->addJoin(SchemaPropertyElementHistoryPeer::SCHEMA_ID, SchemaPeer::alias('a4', SchemaPeer::ID));
     $c->addAlias('a4', SchemaPeer::TABLE_NAME);
     ProfilePropertyPeer::addSelectColumns($c, 'a5');
     $startcol7 = $startcol6 + ProfilePropertyPeer::NUM_COLUMNS;
     $c->addJoin(SchemaPropertyElementHistoryPeer::PROFILE_PROPERTY_ID, ProfilePropertyPeer::alias('a5', ProfilePropertyPeer::ID));
     $c->addAlias('a5', ProfilePropertyPeer::TABLE_NAME);
     SchemaPropertyPeer::addSelectColumns($c, 'a6');
     $startcol8 = $startcol7 + SchemaPropertyPeer::NUM_COLUMNS;
     $c->addJoin(SchemaPropertyElementHistoryPeer::RELATED_SCHEMA_PROPERTY_ID, SchemaPropertyPeer::alias('a6', SchemaPropertyPeer::ID));
     $c->addAlias('a6', SchemaPropertyPeer::TABLE_NAME);
     StatusPeer::addSelectColumns($c, 'a7');
     $startcol9 = $startcol8 + StatusPeer::NUM_COLUMNS;
     $c->addJoin(SchemaPropertyElementHistoryPeer::STATUS_ID, StatusPeer::alias('a7', StatusPeer::ID));
     $c->addAlias('a7', StatusPeer::TABLE_NAME);
     FileImportHistoryPeer::addSelectColumns($c, 'a8');
     $startcol10 = $startcol9 + FileImportHistoryPeer::NUM_COLUMNS;
     $c->addJoin(SchemaPropertyElementHistoryPeer::IMPORT_ID, FileImportHistoryPeer::alias('a8', FileImportHistoryPeer::ID));
     $c->addAlias('a8', FileImportHistoryPeer::TABLE_NAME);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = SchemaPropertyElementHistoryPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         // Add objects for joined User rows
         $omClass = UserPeer::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->getUser();
             // CHECKME
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addSchemaPropertyElementHistory($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj2->initSchemaPropertyElementHistorys();
             $obj2->addSchemaPropertyElementHistory($obj1);
         }
         // Add objects for joined SchemaPropertyElement rows
         $omClass = SchemaPropertyElementPeer::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->getSchemaPropertyElement();
             // CHECKME
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addSchemaPropertyElementHistory($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj3->initSchemaPropertyElementHistorys();
             $obj3->addSchemaPropertyElementHistory($obj1);
         }
         // Add objects for joined SchemaProperty rows
         $omClass = SchemaPropertyPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj4 = new $cls();
         $obj4->hydrate($rs, $startcol4);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj4 = $temp_obj1->getSchemaPropertyRelatedBySchemaPropertyId();
             // CHECKME
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addSchemaPropertyElementHistoryRelatedBySchemaPropertyId($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj4->initSchemaPropertyElementHistorysRelatedBySchemaPropertyId();
             $obj4->addSchemaPropertyElementHistoryRelatedBySchemaPropertyId($obj1);
         }
         // Add objects for joined Schema rows
         $omClass = SchemaPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj5 = new $cls();
         $obj5->hydrate($rs, $startcol5);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj5 = $temp_obj1->getSchema();
             // CHECKME
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addSchemaPropertyElementHistory($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj5->initSchemaPropertyElementHistorys();
             $obj5->addSchemaPropertyElementHistory($obj1);
         }
         // Add objects for joined ProfileProperty rows
         $omClass = ProfilePropertyPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj6 = new $cls();
         $obj6->hydrate($rs, $startcol6);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj6 = $temp_obj1->getProfileProperty();
             // CHECKME
             if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj6->addSchemaPropertyElementHistory($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj6->initSchemaPropertyElementHistorys();
             $obj6->addSchemaPropertyElementHistory($obj1);
         }
         // Add objects for joined SchemaProperty rows
         $omClass = SchemaPropertyPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj7 = new $cls();
         $obj7->hydrate($rs, $startcol7);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj7 = $temp_obj1->getSchemaPropertyRelatedByRelatedSchemaPropertyId();
             // CHECKME
             if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj7->addSchemaPropertyElementHistoryRelatedByRelatedSchemaPropertyId($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj7->initSchemaPropertyElementHistorysRelatedByRelatedSchemaPropertyId();
             $obj7->addSchemaPropertyElementHistoryRelatedByRelatedSchemaPropertyId($obj1);
         }
         // Add objects for joined Status rows
         $omClass = StatusPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj8 = new $cls();
         $obj8->hydrate($rs, $startcol8);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj8 = $temp_obj1->getStatus();
             // CHECKME
             if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj8->addSchemaPropertyElementHistory($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj8->initSchemaPropertyElementHistorys();
             $obj8->addSchemaPropertyElementHistory($obj1);
         }
         // Add objects for joined FileImportHistory rows
         $omClass = FileImportHistoryPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj9 = new $cls();
         $obj9->hydrate($rs, $startcol9);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj9 = $temp_obj1->getFileImportHistory();
             // CHECKME
             if ($temp_obj9->getPrimaryKey() === $obj9->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj9->addSchemaPropertyElementHistory($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj9->initSchemaPropertyElementHistorys();
             $obj9->addSchemaPropertyElementHistory($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
 /**
  * Selects a collection of FileImportHistory objects pre-filled with all related objects.
  *
  * @return array Array of FileImportHistory objects.
  * @throws PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function doSelectJoinAll(Criteria $c, $con = null)
 {
     $c = clone $c;
     // Set the correct dbName if it has not been overridden
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     FileImportHistoryPeer::addSelectColumns($c);
     $startcol2 = FileImportHistoryPeer::NUM_COLUMNS - FileImportHistoryPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     UserPeer::addSelectColumns($c, 'a1');
     $startcol3 = $startcol2 + UserPeer::NUM_COLUMNS;
     $c->addJoin(FileImportHistoryPeer::USER_ID, UserPeer::alias('a1', UserPeer::ID));
     $c->addAlias('a1', UserPeer::TABLE_NAME);
     VocabularyPeer::addSelectColumns($c, 'a2');
     $startcol4 = $startcol3 + VocabularyPeer::NUM_COLUMNS;
     $c->addJoin(FileImportHistoryPeer::VOCABULARY_ID, VocabularyPeer::alias('a2', VocabularyPeer::ID));
     $c->addAlias('a2', VocabularyPeer::TABLE_NAME);
     SchemaPeer::addSelectColumns($c, 'a3');
     $startcol5 = $startcol4 + SchemaPeer::NUM_COLUMNS;
     $c->addJoin(FileImportHistoryPeer::SCHEMA_ID, SchemaPeer::alias('a3', SchemaPeer::ID));
     $c->addAlias('a3', SchemaPeer::TABLE_NAME);
     BatchPeer::addSelectColumns($c, 'a4');
     $startcol6 = $startcol5 + BatchPeer::NUM_COLUMNS;
     $c->addJoin(FileImportHistoryPeer::BATCH_ID, BatchPeer::alias('a4', BatchPeer::ID));
     $c->addAlias('a4', BatchPeer::TABLE_NAME);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = FileImportHistoryPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         // Add objects for joined User rows
         $omClass = UserPeer::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->getUser();
             // CHECKME
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addFileImportHistory($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj2->initFileImportHistorys();
             $obj2->addFileImportHistory($obj1);
         }
         // Add objects for joined Vocabulary rows
         $omClass = VocabularyPeer::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->getVocabulary();
             // CHECKME
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addFileImportHistory($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj3->initFileImportHistorys();
             $obj3->addFileImportHistory($obj1);
         }
         // Add objects for joined Schema rows
         $omClass = SchemaPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj4 = new $cls();
         $obj4->hydrate($rs, $startcol4);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj4 = $temp_obj1->getSchema();
             // CHECKME
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addFileImportHistory($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj4->initFileImportHistorys();
             $obj4->addFileImportHistory($obj1);
         }
         // Add objects for joined Batch rows
         $omClass = BatchPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj5 = new $cls();
         $obj5->hydrate($rs, $startcol5);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj5 = $temp_obj1->getBatch();
             // CHECKME
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addFileImportHistory($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj5->initFileImportHistorys();
             $obj5->addFileImportHistory($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
 /**
  * Selects a collection of SchemaHasVersion objects pre-filled with all related objects.
  *
  * @return array Array of SchemaHasVersion objects.
  * @throws PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function doSelectJoinAll(Criteria $c, $con = null)
 {
     $c = clone $c;
     // Set the correct dbName if it has not been overridden
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     SchemaHasVersionPeer::addSelectColumns($c);
     $startcol2 = SchemaHasVersionPeer::NUM_COLUMNS - SchemaHasVersionPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     UserPeer::addSelectColumns($c, 'a1');
     $startcol3 = $startcol2 + UserPeer::NUM_COLUMNS;
     $c->addJoin(SchemaHasVersionPeer::CREATED_USER_ID, UserPeer::alias('a1', UserPeer::ID));
     $c->addAlias('a1', UserPeer::TABLE_NAME);
     SchemaPeer::addSelectColumns($c, 'a2');
     $startcol4 = $startcol3 + SchemaPeer::NUM_COLUMNS;
     $c->addJoin(SchemaHasVersionPeer::SCHEMA_ID, SchemaPeer::alias('a2', SchemaPeer::ID));
     $c->addAlias('a2', SchemaPeer::TABLE_NAME);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = SchemaHasVersionPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         // Add objects for joined User rows
         $omClass = UserPeer::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->getUser();
             // CHECKME
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addSchemaHasVersion($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj2->initSchemaHasVersions();
             $obj2->addSchemaHasVersion($obj1);
         }
         // Add objects for joined Schema rows
         $omClass = SchemaPeer::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->getSchema();
             // CHECKME
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addSchemaHasVersion($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj3->initSchemaHasVersions();
             $obj3->addSchemaHasVersion($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
 /**
  * Selects a collection of Concept objects pre-filled with all related objects.
  *
  * @return array Array of Concept objects.
  * @throws PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function doSelectJoinAll(Criteria $c, $con = null)
 {
     $c = clone $c;
     // Set the correct dbName if it has not been overridden
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     ConceptPeer::addSelectColumns($c);
     $startcol2 = ConceptPeer::NUM_COLUMNS - ConceptPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     UserPeer::addSelectColumns($c, 'a1');
     $startcol3 = $startcol2 + UserPeer::NUM_COLUMNS;
     $c->addJoin(ConceptPeer::CREATED_USER_ID, UserPeer::alias('a1', UserPeer::ID));
     $c->addAlias('a1', UserPeer::TABLE_NAME);
     UserPeer::addSelectColumns($c, 'a2');
     $startcol4 = $startcol3 + UserPeer::NUM_COLUMNS;
     $c->addJoin(ConceptPeer::UPDATED_USER_ID, UserPeer::alias('a2', UserPeer::ID));
     $c->addAlias('a2', UserPeer::TABLE_NAME);
     VocabularyPeer::addSelectColumns($c, 'a3');
     $startcol5 = $startcol4 + VocabularyPeer::NUM_COLUMNS;
     $c->addJoin(ConceptPeer::VOCABULARY_ID, VocabularyPeer::alias('a3', VocabularyPeer::ID));
     $c->addAlias('a3', VocabularyPeer::TABLE_NAME);
     ConceptPropertyPeer::addSelectColumns($c, 'a4');
     $startcol6 = $startcol5 + ConceptPropertyPeer::NUM_COLUMNS;
     $c->addJoin(ConceptPeer::PREF_LABEL_ID, ConceptPropertyPeer::alias('a4', ConceptPropertyPeer::ID));
     $c->addAlias('a4', ConceptPropertyPeer::TABLE_NAME);
     StatusPeer::addSelectColumns($c, 'a5');
     $startcol7 = $startcol6 + StatusPeer::NUM_COLUMNS;
     $c->addJoin(ConceptPeer::STATUS_ID, StatusPeer::alias('a5', StatusPeer::ID));
     $c->addAlias('a5', StatusPeer::TABLE_NAME);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = ConceptPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         // Add objects for joined User rows
         $omClass = UserPeer::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->getUserRelatedByCreatedUserId();
             // CHECKME
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addConceptRelatedByCreatedUserId($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj2->initConceptsRelatedByCreatedUserId();
             $obj2->addConceptRelatedByCreatedUserId($obj1);
         }
         // Add objects for joined User rows
         $omClass = UserPeer::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->getUserRelatedByUpdatedUserId();
             // CHECKME
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addConceptRelatedByUpdatedUserId($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj3->initConceptsRelatedByUpdatedUserId();
             $obj3->addConceptRelatedByUpdatedUserId($obj1);
         }
         // Add objects for joined Vocabulary rows
         $omClass = VocabularyPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj4 = new $cls();
         $obj4->hydrate($rs, $startcol4);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj4 = $temp_obj1->getVocabulary();
             // CHECKME
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addConcept($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj4->initConcepts();
             $obj4->addConcept($obj1);
         }
         // Add objects for joined ConceptProperty rows
         $omClass = ConceptPropertyPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj5 = new $cls();
         $obj5->hydrate($rs, $startcol5);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj5 = $temp_obj1->getConceptProperty();
             // CHECKME
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addConcept($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj5->initConcepts();
             $obj5->addConcept($obj1);
         }
         // Add objects for joined Status rows
         $omClass = StatusPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj6 = new $cls();
         $obj6->hydrate($rs, $startcol6);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj6 = $temp_obj1->getStatus();
             // CHECKME
             if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj6->addConcept($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj6->initConcepts();
             $obj6->addConcept($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
 /**
  * Selects a collection of Discuss objects pre-filled with all related objects.
  *
  * @return array Array of Discuss objects.
  * @throws PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function doSelectJoinAll(Criteria $c, $con = null)
 {
     $c = clone $c;
     // Set the correct dbName if it has not been overridden
     if ($c->getDbName() == Propel::getDefaultDB()) {
         $c->setDbName(self::DATABASE_NAME);
     }
     DiscussPeer::addSelectColumns($c);
     $startcol2 = DiscussPeer::NUM_COLUMNS - DiscussPeer::NUM_LAZY_LOAD_COLUMNS + 1;
     UserPeer::addSelectColumns($c, 'a1');
     $startcol3 = $startcol2 + UserPeer::NUM_COLUMNS;
     $c->addJoin(DiscussPeer::CREATED_USER_ID, UserPeer::alias('a1', UserPeer::ID));
     $c->addAlias('a1', UserPeer::TABLE_NAME);
     UserPeer::addSelectColumns($c, 'a2');
     $startcol4 = $startcol3 + UserPeer::NUM_COLUMNS;
     $c->addJoin(DiscussPeer::DELETED_USER_ID, UserPeer::alias('a2', UserPeer::ID));
     $c->addAlias('a2', UserPeer::TABLE_NAME);
     SchemaPeer::addSelectColumns($c, 'a3');
     $startcol5 = $startcol4 + SchemaPeer::NUM_COLUMNS;
     $c->addJoin(DiscussPeer::SCHEMA_ID, SchemaPeer::alias('a3', SchemaPeer::ID));
     $c->addAlias('a3', SchemaPeer::TABLE_NAME);
     SchemaPropertyPeer::addSelectColumns($c, 'a4');
     $startcol6 = $startcol5 + SchemaPropertyPeer::NUM_COLUMNS;
     $c->addJoin(DiscussPeer::SCHEMA_PROPERTY_ID, SchemaPropertyPeer::alias('a4', SchemaPropertyPeer::ID));
     $c->addAlias('a4', SchemaPropertyPeer::TABLE_NAME);
     SchemaPropertyElementPeer::addSelectColumns($c, 'a5');
     $startcol7 = $startcol6 + SchemaPropertyElementPeer::NUM_COLUMNS;
     $c->addJoin(DiscussPeer::SCHEMA_PROPERTY_ELEMENT_ID, SchemaPropertyElementPeer::alias('a5', SchemaPropertyElementPeer::ID));
     $c->addAlias('a5', SchemaPropertyElementPeer::TABLE_NAME);
     VocabularyPeer::addSelectColumns($c, 'a6');
     $startcol8 = $startcol7 + VocabularyPeer::NUM_COLUMNS;
     $c->addJoin(DiscussPeer::VOCABULARY_ID, VocabularyPeer::alias('a6', VocabularyPeer::ID));
     $c->addAlias('a6', VocabularyPeer::TABLE_NAME);
     ConceptPeer::addSelectColumns($c, 'a7');
     $startcol9 = $startcol8 + ConceptPeer::NUM_COLUMNS;
     $c->addJoin(DiscussPeer::CONCEPT_ID, ConceptPeer::alias('a7', ConceptPeer::ID));
     $c->addAlias('a7', ConceptPeer::TABLE_NAME);
     ConceptPropertyPeer::addSelectColumns($c, 'a8');
     $startcol10 = $startcol9 + ConceptPropertyPeer::NUM_COLUMNS;
     $c->addJoin(DiscussPeer::CONCEPT_PROPERTY_ID, ConceptPropertyPeer::alias('a8', ConceptPropertyPeer::ID));
     $c->addAlias('a8', ConceptPropertyPeer::TABLE_NAME);
     $rs = BasePeer::doSelect($c, $con);
     $results = array();
     while ($rs->next()) {
         $omClass = DiscussPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj1 = new $cls();
         $obj1->hydrate($rs);
         // Add objects for joined User rows
         $omClass = UserPeer::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->getUserRelatedByCreatedUserId();
             // CHECKME
             if ($temp_obj2->getPrimaryKey() === $obj2->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj2->addDiscussRelatedByCreatedUserId($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj2->initDiscusssRelatedByCreatedUserId();
             $obj2->addDiscussRelatedByCreatedUserId($obj1);
         }
         // Add objects for joined User rows
         $omClass = UserPeer::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->getUserRelatedByDeletedUserId();
             // CHECKME
             if ($temp_obj3->getPrimaryKey() === $obj3->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj3->addDiscussRelatedByDeletedUserId($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj3->initDiscusssRelatedByDeletedUserId();
             $obj3->addDiscussRelatedByDeletedUserId($obj1);
         }
         // Add objects for joined Schema rows
         $omClass = SchemaPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj4 = new $cls();
         $obj4->hydrate($rs, $startcol4);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj4 = $temp_obj1->getSchema();
             // CHECKME
             if ($temp_obj4->getPrimaryKey() === $obj4->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj4->addDiscuss($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj4->initDiscusss();
             $obj4->addDiscuss($obj1);
         }
         // Add objects for joined SchemaProperty rows
         $omClass = SchemaPropertyPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj5 = new $cls();
         $obj5->hydrate($rs, $startcol5);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj5 = $temp_obj1->getSchemaProperty();
             // CHECKME
             if ($temp_obj5->getPrimaryKey() === $obj5->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj5->addDiscuss($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj5->initDiscusss();
             $obj5->addDiscuss($obj1);
         }
         // Add objects for joined SchemaPropertyElement rows
         $omClass = SchemaPropertyElementPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj6 = new $cls();
         $obj6->hydrate($rs, $startcol6);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj6 = $temp_obj1->getSchemaPropertyElement();
             // CHECKME
             if ($temp_obj6->getPrimaryKey() === $obj6->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj6->addDiscuss($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj6->initDiscusss();
             $obj6->addDiscuss($obj1);
         }
         // Add objects for joined Vocabulary rows
         $omClass = VocabularyPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj7 = new $cls();
         $obj7->hydrate($rs, $startcol7);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj7 = $temp_obj1->getVocabulary();
             // CHECKME
             if ($temp_obj7->getPrimaryKey() === $obj7->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj7->addDiscuss($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj7->initDiscusss();
             $obj7->addDiscuss($obj1);
         }
         // Add objects for joined Concept rows
         $omClass = ConceptPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj8 = new $cls();
         $obj8->hydrate($rs, $startcol8);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj8 = $temp_obj1->getConcept();
             // CHECKME
             if ($temp_obj8->getPrimaryKey() === $obj8->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj8->addDiscuss($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj8->initDiscusss();
             $obj8->addDiscuss($obj1);
         }
         // Add objects for joined ConceptProperty rows
         $omClass = ConceptPropertyPeer::getOMClass();
         $cls = Propel::import($omClass);
         $obj9 = new $cls();
         $obj9->hydrate($rs, $startcol9);
         $newObject = true;
         for ($j = 0, $resCount = count($results); $j < $resCount; $j++) {
             $temp_obj1 = $results[$j];
             $temp_obj9 = $temp_obj1->getConceptProperty();
             // CHECKME
             if ($temp_obj9->getPrimaryKey() === $obj9->getPrimaryKey()) {
                 $newObject = false;
                 $temp_obj9->addDiscuss($obj1);
                 // CHECKME
                 break;
             }
         }
         if ($newObject) {
             $obj9->initDiscusss();
             $obj9->addDiscuss($obj1);
         }
         $results[] = $obj1;
     }
     return $results;
 }
Ejemplo n.º 7
0
 /**
  * Add all the columns needed to create a new object.
  *
  * Note: any columns that were marked with lazyLoad="true" in the
  * XML schema will not be added to the select list and only loaded
  * on demand.
  *
  * @param      criteria object containing the columns to add.
  * @throws     PropelException Any exceptions caught during processing will be
  *		 rethrown wrapped into a PropelException.
  */
 public static function addSelectColumns(Criteria $criteria, $tableAlias = null)
 {
     $criteria->addSelectColumn($tableAlias ? UserPeer::alias($tableAlias, UserPeer::ID) : UserPeer::ID);
     $criteria->addSelectColumn($tableAlias ? UserPeer::alias($tableAlias, UserPeer::CREATED_AT) : UserPeer::CREATED_AT);
     $criteria->addSelectColumn($tableAlias ? UserPeer::alias($tableAlias, UserPeer::LAST_UPDATED) : UserPeer::LAST_UPDATED);
     $criteria->addSelectColumn($tableAlias ? UserPeer::alias($tableAlias, UserPeer::DELETED_AT) : UserPeer::DELETED_AT);
     $criteria->addSelectColumn($tableAlias ? UserPeer::alias($tableAlias, UserPeer::NICKNAME) : UserPeer::NICKNAME);
     $criteria->addSelectColumn($tableAlias ? UserPeer::alias($tableAlias, UserPeer::SALUTATION) : UserPeer::SALUTATION);
     $criteria->addSelectColumn($tableAlias ? UserPeer::alias($tableAlias, UserPeer::FIRST_NAME) : UserPeer::FIRST_NAME);
     $criteria->addSelectColumn($tableAlias ? UserPeer::alias($tableAlias, UserPeer::LAST_NAME) : UserPeer::LAST_NAME);
     $criteria->addSelectColumn($tableAlias ? UserPeer::alias($tableAlias, UserPeer::EMAIL) : UserPeer::EMAIL);
     $criteria->addSelectColumn($tableAlias ? UserPeer::alias($tableAlias, UserPeer::SHA1_PASSWORD) : UserPeer::SHA1_PASSWORD);
     $criteria->addSelectColumn($tableAlias ? UserPeer::alias($tableAlias, UserPeer::SALT) : UserPeer::SALT);
     $criteria->addSelectColumn($tableAlias ? UserPeer::alias($tableAlias, UserPeer::WANT_TO_BE_MODERATOR) : UserPeer::WANT_TO_BE_MODERATOR);
     $criteria->addSelectColumn($tableAlias ? UserPeer::alias($tableAlias, UserPeer::IS_MODERATOR) : UserPeer::IS_MODERATOR);
     $criteria->addSelectColumn($tableAlias ? UserPeer::alias($tableAlias, UserPeer::IS_ADMINISTRATOR) : UserPeer::IS_ADMINISTRATOR);
     $criteria->addSelectColumn($tableAlias ? UserPeer::alias($tableAlias, UserPeer::DELETIONS) : UserPeer::DELETIONS);
     $criteria->addSelectColumn($tableAlias ? UserPeer::alias($tableAlias, UserPeer::PASSWORD) : UserPeer::PASSWORD);
     $criteria->addSelectColumn($tableAlias ? UserPeer::alias($tableAlias, UserPeer::CULTURE) : UserPeer::CULTURE);
 }