public SqlString ToSubselectString(string ukname)
		{
			string[] joinColumns = ukname == null
			                       	? StringHelper.Qualify(alias, loadable.IdentifierColumnNames)
			                       	: ((IPropertyMapping) loadable).ToColumns(alias, ukname);

			SqlString sqlString = new SqlStringBuilder()
				.Add("select ")
				.Add(StringHelper.Join(", ", joinColumns))
				.Add(queryString)
				.ToSqlString();

			RowSelection selection = queryParameters.RowSelection;

			bool useLimit = Loader.Loader.UseLimit(selection, dialect);
			bool hasFirstRow = Loader.Loader.GetFirstRow(selection) > 0;
			bool useOffset = hasFirstRow && useLimit && dialect.SupportsLimitOffset;

			if ((useLimit || hasFirstRow) == false)
				return sqlString;

			sqlString = AppendOrderByIfNeeded(sqlString);

			return dialect.GetLimitString(sqlString.Trim(),
										  useOffset ? Loader.Loader.GetFirstRow(selection) : 0,
										  Loader.Loader.GetMaxOrLimit(dialect, selection));
		}