/** * Deletes all associated WikiVersionsAsPostedBy * @return void */ public function DeleteAllWikiVersionsAsPostedBy() { if (is_null($this->intId)) { throw new QUndefinedPrimaryKeyException('Unable to call UnassociateWikiVersionAsPostedBy on this unsaved Person.'); } // Get the Database Object for this Class $objDatabase = Person::GetDatabase(); // Journaling if ($objDatabase->JournalingDatabase) { foreach (WikiVersion::LoadArrayByPostedByPersonId($this->intId) as $objWikiVersion) { $objWikiVersion->Journal('DELETE'); } } // Perform the SQL Query $objDatabase->NonQuery(' DELETE FROM `wiki_version` WHERE `posted_by_person_id` = ' . $objDatabase->SqlVariable($this->intId) . ' '); }
/** * Gets all associated WikiVersionsAsPostedBy as an array of WikiVersion objects * @param QQClause[] $objOptionalClauses additional optional QQClause objects for this query * @return WikiVersion[] */ public function GetWikiVersionAsPostedByArray($objOptionalClauses = null) { if (is_null($this->intId)) { return array(); } try { return WikiVersion::LoadArrayByPostedByPersonId($this->intId, $objOptionalClauses); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } }