/** * Deletes all associated IssueFieldValues * @return void */ public function DeleteAllIssueFieldValues() { if (is_null($this->intId)) { throw new QUndefinedPrimaryKeyException('Unable to call UnassociateIssueFieldValue on this unsaved IssueFieldOption.'); } // Get the Database Object for this Class $objDatabase = IssueFieldOption::GetDatabase(); // Journaling if ($objDatabase->JournalingDatabase) { foreach (IssueFieldValue::LoadArrayByIssueFieldOptionId($this->intId) as $objIssueFieldValue) { $objIssueFieldValue->Journal('DELETE'); } } // Perform the SQL Query $objDatabase->NonQuery(' DELETE FROM `issue_field_value` WHERE `issue_field_option_id` = ' . $objDatabase->SqlVariable($this->intId) . ' '); }