Closed
Description
stanislav merovic created an issue — 2nd November 2011, 6:42:53:
When trying to add a order for a composite-id using criteria queries the alias is removed only for the last property and a invalid query is created.
Cause: Order.ToSqlString -> NHibernate.Util.StringHelper.RemoveAsAliasesFromSql(produced); -> sql.Substring(0, sql.LastIndexOfCaseInsensitive(" as "));
stanislav merovic added a comment — 2nd November 2011, 7:08:28:
Forgot to mention: This happens when using the identifier projection.
crit.AddOrder(Order.Asc(Projections.Id))