I have the following hql query which I'd like to switch over to the criteria API
select a.Id as Id, a.Name as Name, a.ActiveStatus as ActiveStatus,
dbo.GetActivityStartDate(a.Id) as StartDate,
dbo.GetActivityEndDate(a.Id) as EndDate,
coalesce(ac.Id,0) As CategoryId,
coalesce(ac.Name,'') As CategoryName
from Activity as a
left outer join a.Category as ac
Obviously the initial properties on the select line are trivial (Projections.Property); my question is..how do I map the remaining 4 properties?
I have a custom dialect that registers dbo.GetActivityStartDate
and dbo.GetActivityEndDate
as standard SQL functions - so that much is already taken care of.