/**
  * 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;
 }
 /**
  * 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 ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::ID) : ProfilePropertyPeer::ID);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::SKOS_ID) : ProfilePropertyPeer::SKOS_ID);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::CREATED_AT) : ProfilePropertyPeer::CREATED_AT);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::UPDATED_AT) : ProfilePropertyPeer::UPDATED_AT);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::DELETED_AT) : ProfilePropertyPeer::DELETED_AT);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::CREATED_BY) : ProfilePropertyPeer::CREATED_BY);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::UPDATED_BY) : ProfilePropertyPeer::UPDATED_BY);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::DELETED_BY) : ProfilePropertyPeer::DELETED_BY);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::PROFILE_ID) : ProfilePropertyPeer::PROFILE_ID);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::SKOS_PARENT_ID) : ProfilePropertyPeer::SKOS_PARENT_ID);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::NAME) : ProfilePropertyPeer::NAME);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::LABEL) : ProfilePropertyPeer::LABEL);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::DEFINITION) : ProfilePropertyPeer::DEFINITION);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::COMMENT) : ProfilePropertyPeer::COMMENT);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::TYPE) : ProfilePropertyPeer::TYPE);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::URI) : ProfilePropertyPeer::URI);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::STATUS_ID) : ProfilePropertyPeer::STATUS_ID);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::LANGUAGE) : ProfilePropertyPeer::LANGUAGE);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::NOTE) : ProfilePropertyPeer::NOTE);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::DISPLAY_ORDER) : ProfilePropertyPeer::DISPLAY_ORDER);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::EXPORT_ORDER) : ProfilePropertyPeer::EXPORT_ORDER);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::PICKLIST_ORDER) : ProfilePropertyPeer::PICKLIST_ORDER);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::EXAMPLES) : ProfilePropertyPeer::EXAMPLES);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::IS_REQUIRED) : ProfilePropertyPeer::IS_REQUIRED);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::IS_RECIPROCAL) : ProfilePropertyPeer::IS_RECIPROCAL);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::IS_SINGLETON) : ProfilePropertyPeer::IS_SINGLETON);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::IS_IN_PICKLIST) : ProfilePropertyPeer::IS_IN_PICKLIST);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::IS_IN_EXPORT) : ProfilePropertyPeer::IS_IN_EXPORT);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::INVERSE_PROFILE_PROPERTY_ID) : ProfilePropertyPeer::INVERSE_PROFILE_PROPERTY_ID);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::IS_IN_CLASS_PICKLIST) : ProfilePropertyPeer::IS_IN_CLASS_PICKLIST);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::IS_IN_PROPERTY_PICKLIST) : ProfilePropertyPeer::IS_IN_PROPERTY_PICKLIST);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::IS_IN_RDF) : ProfilePropertyPeer::IS_IN_RDF);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::IS_IN_XSD) : ProfilePropertyPeer::IS_IN_XSD);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::IS_ATTRIBUTE) : ProfilePropertyPeer::IS_ATTRIBUTE);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::HAS_LANGUAGE) : ProfilePropertyPeer::HAS_LANGUAGE);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::IS_OBJECT_PROP) : ProfilePropertyPeer::IS_OBJECT_PROP);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::IS_IN_FORM) : ProfilePropertyPeer::IS_IN_FORM);
     $criteria->addSelectColumn($tableAlias ? ProfilePropertyPeer::alias($tableAlias, ProfilePropertyPeer::NAMESPCE) : ProfilePropertyPeer::NAMESPCE);
 }