public function hookTransactions (Resource\Db &$parent, Resource\Db &$child = NULL)
	{
		
		// Use default object database resource if none is specified
		
		if (!$child)
		{
			$child	=& $this->getResource ('db');
		}
		
		/**
		 * We only want to create the hook and begin a transaction on the database
		 * if a transaction has already begun on the database we're hooking onto.
		 */
		
		if ($parent->getTransactionCount () > 0 && $parent->addTransactionHook ($child))
		{
			$child->beginTransaction ();
		}
		
	}