private void addProjectionsToQuery(Query query, ColumnFamily colFamily,
			Table table) {
		for (Column column : colFamily.getColumns()) {
			if (column.isChecked()) {
				QueryAttribute qa = new QueryAttribute(column.getTable(),
						column.getName());
				query.addProjection(qa);
			}
		}

		String extBaseTableName = "";
		ColumnFamily.Type extBaseTableType = null;
		if (colFamily.getType() == ColumnFamily.Type.EXT) {
			String firstRelation = colFamily.getName().split(
					conf.getExtColFamilyDelimiter())[0];
			extBaseTableName = firstRelation;
			extBaseTableType = table.getColumnFamily(extBaseTableName)
					.getType();
		}

		if (colFamily.getType() == ColumnFamily.Type.MANY
				|| (colFamily.getType() == ColumnFamily.Type.EXT && extBaseTableType == ColumnFamily.Type.MANY)) {
			List<Column> manyKey = null;
			if (colFamily.getType() == ColumnFamily.Type.MANY) {
				manyKey = colFamily.getManyKey();
			} else {
				manyKey = table.getColumnFamily(extBaseTableName).getManyKey();
			}

			for (Column column : manyKey) {
				QueryAttribute qa = new QueryAttribute(column.getTable(),
						column.getName());
				query.addProjection(qa);
			}
		}

	}