/** * Deletes an associated StewardshipStack * @param StewardshipStack $objStewardshipStack * @return void */ public function DeleteAssociatedStewardshipStack(StewardshipStack $objStewardshipStack) { if (is_null($this->intId)) { throw new QUndefinedPrimaryKeyException('Unable to call UnassociateStewardshipStack on this unsaved StewardshipBatch.'); } if (is_null($objStewardshipStack->Id)) { throw new QUndefinedPrimaryKeyException('Unable to call UnassociateStewardshipStack on this StewardshipBatch with an unsaved StewardshipStack.'); } // Get the Database Object for this Class $objDatabase = StewardshipBatch::GetDatabase(); // Perform the SQL Query $objDatabase->NonQuery(' DELETE FROM `stewardship_stack` WHERE `id` = ' . $objDatabase->SqlVariable($objStewardshipStack->Id) . ' AND `stewardship_batch_id` = ' . $objDatabase->SqlVariable($this->intId) . ' '); // Journaling if ($objDatabase->JournalingDatabase) { $objStewardshipStack->Journal('DELETE'); } }