public function save($runValidation=true)
	{
		if ($this->beforeSave())
		{
			// If we want to run validation AND the validation failed, give up
			
			if ($this->beforeValidate())
			{
				if ($runValidation && !$this->validate())
					return false;
			}
			else
				return false;

			$this->afterValidate();
			
			$connection = Yii::app()->db;
			$transaction = $connection->beginTransaction();

			try {
				foreach($this->attributes as $key=>$value)
				{
					$command = $connection->createCommand('INSERT INTO `configuration` VALUES (:key, :value, UTC_TIMESTAMP(), UTC_TIMESTAMP()) ON DUPLICATE KEY UPDATE value = :value2, updated = UTC_TIMESTAMP()');
					$command->bindParam(':key', $key);
					$command->bindParam(':value', $value);
					$command->bindParam(':value2', $value);
					$command->execute();
					Yii::app()->cache->delete('settings_'.$key);
				}
			} catch (Exception $e) {
				$transaciton->rollBack();
				return false;
			}

			$transaction->commit();
			$this->afterSave();

			// Return the commit response
			return true;
		}
	}