/** * Deletes an associated Shortcut * @param Shortcut $objShortcut * @return void */ public function DeleteAssociatedShortcut(Shortcut $objShortcut) { if (is_null($this->intTransactionTypeId)) { throw new QUndefinedPrimaryKeyException('Unable to call UnassociateShortcut on this unsaved TransactionType.'); } if (is_null($objShortcut->ShortcutId)) { throw new QUndefinedPrimaryKeyException('Unable to call UnassociateShortcut on this TransactionType with an unsaved Shortcut.'); } // Get the Database Object for this Class $objDatabase = TransactionType::GetDatabase(); // Perform the SQL Query $objDatabase->NonQuery(' DELETE FROM `shortcut` WHERE `shortcut_id` = ' . $objDatabase->SqlVariable($objShortcut->ShortcutId) . ' AND `transaction_type_id` = ' . $objDatabase->SqlVariable($this->intTransactionTypeId) . ' '); // Journaling if ($objDatabase->JournalingDatabase) { $objShortcut->Journal('DELETE'); } }