Duplicate
Details
Details
Assignee
Unassigned
UnassignedReporter
Emanuel Wlaschitz
Emanuel WlaschitzLabels
Components
Priority
Who's Looking?
Open Who's Looking?
Created May 21, 2012 at 6:59 AM
Updated September 3, 2014 at 1:52 AM
Resolved September 3, 2014 at 1:52 AM
Microsoft.NET Framework 3.5
MSSQL 2008
As noted in NH-3138, it appears that a HQL query with Order By cannot refer to an alias correctly; the following query will throw (see test fixture for NH3138, method PageQueryWithDistinctAndOrderByContainingAliasedFunction):
select distinct e.Id, coalesce(e.EnglishName, e.GermanName) as LocalizedName from Entity e order by LocalizedName asc