/** * Selects a collection of SchemaPropertyElementHistory objects pre-filled with all related objects except FileImportHistory. * * @return array Array of SchemaPropertyElementHistory objects. * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ public static function doSelectJoinAllExceptFileImportHistory(Criteria $c, $con = null) { $c = clone $c; // Set the correct dbName if it has not been overridden // $c->getDbName() will return the same object if not set to another value // so == check is okay and faster 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); $startcol3 = $startcol2 + UserPeer::NUM_COLUMNS; SchemaPropertyElementPeer::addSelectColumns($c); $startcol4 = $startcol3 + SchemaPropertyElementPeer::NUM_COLUMNS; SchemaPropertyPeer::addSelectColumns($c); $startcol5 = $startcol4 + SchemaPropertyPeer::NUM_COLUMNS; SchemaPeer::addSelectColumns($c); $startcol6 = $startcol5 + SchemaPeer::NUM_COLUMNS; ProfilePropertyPeer::addSelectColumns($c); $startcol7 = $startcol6 + ProfilePropertyPeer::NUM_COLUMNS; SchemaPropertyPeer::addSelectColumns($c); $startcol8 = $startcol7 + SchemaPropertyPeer::NUM_COLUMNS; StatusPeer::addSelectColumns($c); $startcol9 = $startcol8 + StatusPeer::NUM_COLUMNS; $c->addJoin(SchemaPropertyElementHistoryPeer::CREATED_USER_ID, UserPeer::ID); $c->addJoin(SchemaPropertyElementHistoryPeer::SCHEMA_PROPERTY_ELEMENT_ID, SchemaPropertyElementPeer::ID); $c->addJoin(SchemaPropertyElementHistoryPeer::SCHEMA_PROPERTY_ID, SchemaPropertyPeer::ID); $c->addJoin(SchemaPropertyElementHistoryPeer::SCHEMA_ID, SchemaPeer::ID); $c->addJoin(SchemaPropertyElementHistoryPeer::PROFILE_PROPERTY_ID, ProfilePropertyPeer::ID); $c->addJoin(SchemaPropertyElementHistoryPeer::RELATED_SCHEMA_PROPERTY_ID, SchemaPropertyPeer::ID); $c->addJoin(SchemaPropertyElementHistoryPeer::STATUS_ID, StatusPeer::ID); $rs = BasePeer::doSelect($c, $con); $results = array(); while ($rs->next()) { $omClass = SchemaPropertyElementHistoryPeer::getOMClass(); $cls = Propel::import($omClass); $obj1 = new $cls(); $obj1->hydrate($rs); $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); break; } } if ($newObject) { $obj2->initSchemaPropertyElementHistorys(); $obj2->addSchemaPropertyElementHistory($obj1); } $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); break; } } if ($newObject) { $obj3->initSchemaPropertyElementHistorys(); $obj3->addSchemaPropertyElementHistory($obj1); } $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); break; } } if ($newObject) { $obj4->initSchemaPropertyElementHistorysRelatedBySchemaPropertyId(); $obj4->addSchemaPropertyElementHistoryRelatedBySchemaPropertyId($obj1); } $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); break; } } if ($newObject) { $obj5->initSchemaPropertyElementHistorys(); $obj5->addSchemaPropertyElementHistory($obj1); } $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); break; } } if ($newObject) { $obj6->initSchemaPropertyElementHistorys(); $obj6->addSchemaPropertyElementHistory($obj1); } $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); break; } } if ($newObject) { $obj7->initSchemaPropertyElementHistorysRelatedByRelatedSchemaPropertyId(); $obj7->addSchemaPropertyElementHistoryRelatedByRelatedSchemaPropertyId($obj1); } $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); break; } } if ($newObject) { $obj8->initSchemaPropertyElementHistorys(); $obj8->addSchemaPropertyElementHistory($obj1); } $results[] = $obj1; } return $results; }
/** * Selects a collection of SchemaProperty objects pre-filled with all related objects except Status. * * @return array Array of SchemaProperty objects. * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ public static function doSelectJoinAllExceptStatus(Criteria $c, $con = null) { $c = clone $c; // Set the correct dbName if it has not been overridden // $c->getDbName() will return the same object if not set to another value // so == check is okay and faster if ($c->getDbName() == Propel::getDefaultDB()) { $c->setDbName(self::DATABASE_NAME); } SchemaPropertyPeer::addSelectColumns($c); $startcol2 = SchemaPropertyPeer::NUM_COLUMNS - SchemaPropertyPeer::NUM_LAZY_LOAD_COLUMNS + 1; UserPeer::addSelectColumns($c); $startcol3 = $startcol2 + UserPeer::NUM_COLUMNS; UserPeer::addSelectColumns($c); $startcol4 = $startcol3 + UserPeer::NUM_COLUMNS; SchemaPeer::addSelectColumns($c); $startcol5 = $startcol4 + SchemaPeer::NUM_COLUMNS; $c->addJoin(SchemaPropertyPeer::CREATED_USER_ID, UserPeer::ID); $c->addJoin(SchemaPropertyPeer::UPDATED_USER_ID, UserPeer::ID); $c->addJoin(SchemaPropertyPeer::SCHEMA_ID, SchemaPeer::ID); $rs = BasePeer::doSelect($c, $con); $results = array(); while ($rs->next()) { $omClass = SchemaPropertyPeer::getOMClass(); $cls = Propel::import($omClass); $obj1 = new $cls(); $obj1->hydrate($rs); $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->addSchemaPropertyRelatedByCreatedUserId($obj1); break; } } if ($newObject) { $obj2->initSchemaPropertysRelatedByCreatedUserId(); $obj2->addSchemaPropertyRelatedByCreatedUserId($obj1); } $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->addSchemaPropertyRelatedByUpdatedUserId($obj1); break; } } if ($newObject) { $obj3->initSchemaPropertysRelatedByUpdatedUserId(); $obj3->addSchemaPropertyRelatedByUpdatedUserId($obj1); } $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->addSchemaProperty($obj1); break; } } if ($newObject) { $obj4->initSchemaPropertys(); $obj4->addSchemaProperty($obj1); } $results[] = $obj1; } return $results; }
/** * If this collection has already been initialized with * an identical criteria, it returns the collection. * Otherwise if this SchemaProperty has previously * been saved, it will retrieve related SchemaPropertysRelatedByIsSubpropertyOf from storage. * If this SchemaProperty is new, it will return * an empty collection or the current collection, the criteria * is ignored on a new object. * * @param Connection $con * @param Criteria $criteria * @throws PropelException */ public function getSchemaPropertysRelatedByIsSubpropertyOf($criteria = null, $con = null) { // include the Peer class include_once 'lib/model/om/BaseSchemaPropertyPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collSchemaPropertysRelatedByIsSubpropertyOf === null) { if ($this->isNew()) { $this->collSchemaPropertysRelatedByIsSubpropertyOf = array(); } else { $criteria->add(SchemaPropertyPeer::IS_SUBPROPERTY_OF, $this->getId()); SchemaPropertyPeer::addSelectColumns($criteria); $this->collSchemaPropertysRelatedByIsSubpropertyOf = SchemaPropertyPeer::doSelect($criteria, $con); } } else { // criteria has no effect for a new object if (!$this->isNew()) { // the following code is to determine if a new query is // called for. If the criteria is the same as the last // one, just return the collection. $criteria->add(SchemaPropertyPeer::IS_SUBPROPERTY_OF, $this->getId()); SchemaPropertyPeer::addSelectColumns($criteria); if (!isset($this->lastSchemaPropertyRelatedByIsSubpropertyOfCriteria) || !$this->lastSchemaPropertyRelatedByIsSubpropertyOfCriteria->equals($criteria)) { $this->collSchemaPropertysRelatedByIsSubpropertyOf = SchemaPropertyPeer::doSelect($criteria, $con); } } } $this->lastSchemaPropertyRelatedByIsSubpropertyOfCriteria = $criteria; return $this->collSchemaPropertysRelatedByIsSubpropertyOf; }
/** * Selects a collection of Discuss objects pre-filled with all related objects except DiscussRelatedByParentId. * * @return array Array of Discuss objects. * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ public static function doSelectJoinAllExceptDiscussRelatedByParentId(Criteria $c, $con = null) { $c = clone $c; // Set the correct dbName if it has not been overridden // $c->getDbName() will return the same object if not set to another value // so == check is okay and faster 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); $startcol3 = $startcol2 + UserPeer::NUM_COLUMNS; UserPeer::addSelectColumns($c); $startcol4 = $startcol3 + UserPeer::NUM_COLUMNS; SchemaPeer::addSelectColumns($c); $startcol5 = $startcol4 + SchemaPeer::NUM_COLUMNS; SchemaPropertyPeer::addSelectColumns($c); $startcol6 = $startcol5 + SchemaPropertyPeer::NUM_COLUMNS; SchemaPropertyElementPeer::addSelectColumns($c); $startcol7 = $startcol6 + SchemaPropertyElementPeer::NUM_COLUMNS; VocabularyPeer::addSelectColumns($c); $startcol8 = $startcol7 + VocabularyPeer::NUM_COLUMNS; ConceptPeer::addSelectColumns($c); $startcol9 = $startcol8 + ConceptPeer::NUM_COLUMNS; ConceptPropertyPeer::addSelectColumns($c); $startcol10 = $startcol9 + ConceptPropertyPeer::NUM_COLUMNS; $c->addJoin(DiscussPeer::CREATED_USER_ID, UserPeer::ID); $c->addJoin(DiscussPeer::DELETED_USER_ID, UserPeer::ID); $c->addJoin(DiscussPeer::SCHEMA_ID, SchemaPeer::ID); $c->addJoin(DiscussPeer::SCHEMA_PROPERTY_ID, SchemaPropertyPeer::ID); $c->addJoin(DiscussPeer::SCHEMA_PROPERTY_ELEMENT_ID, SchemaPropertyElementPeer::ID); $c->addJoin(DiscussPeer::VOCABULARY_ID, VocabularyPeer::ID); $c->addJoin(DiscussPeer::CONCEPT_ID, ConceptPeer::ID); $c->addJoin(DiscussPeer::CONCEPT_PROPERTY_ID, ConceptPropertyPeer::ID); $rs = BasePeer::doSelect($c, $con); $results = array(); while ($rs->next()) { $omClass = DiscussPeer::getOMClass(); $cls = Propel::import($omClass); $obj1 = new $cls(); $obj1->hydrate($rs); $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); break; } } if ($newObject) { $obj2->initDiscusssRelatedByCreatedUserId(); $obj2->addDiscussRelatedByCreatedUserId($obj1); } $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); break; } } if ($newObject) { $obj3->initDiscusssRelatedByDeletedUserId(); $obj3->addDiscussRelatedByDeletedUserId($obj1); } $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); break; } } if ($newObject) { $obj4->initDiscusss(); $obj4->addDiscuss($obj1); } $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); break; } } if ($newObject) { $obj5->initDiscusss(); $obj5->addDiscuss($obj1); } $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); break; } } if ($newObject) { $obj6->initDiscusss(); $obj6->addDiscuss($obj1); } $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); break; } } if ($newObject) { $obj7->initDiscusss(); $obj7->addDiscuss($obj1); } $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); break; } } if ($newObject) { $obj8->initDiscusss(); $obj8->addDiscuss($obj1); } $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); break; } } if ($newObject) { $obj9->initDiscusss(); $obj9->addDiscuss($obj1); } $results[] = $obj1; } return $results; }