public function deleteWhere(SQLPredicate $condition = null, $cascade = false) {
		//connect to database
		$this->mapper->connect();
		
		//begin transaction
		$this->mapper->beginTransaction();
		
		if ($cascade) {
			$list = $this->find($condition);
				
			foreach ($list as $entity)
				$this->delete($entity);
			
			$result = true;
		}
		else {
			$query = $this->mapper->newQuery($this->entityProfile)
			->deleteFrom($this->entityProfile->getEntityTable())
			->where($condition);
			
			//run query
			$result = $query->exec();
		}
		
		//commit
		$this->mapper->commit();
		return $result;
	}