I ended up solving this by registering ISNULL as a standard sql function with my dialect, worked like a charm when called with Projections.SqlFunction
On Jul 20, 8:47 am, DanPlaskon <[email protected]> wrote: > Hi all, > > I'm trying to convert the following hql statement to use the criteria > API instead; but I'm having no luck getting either the coalesce or > ISNULL function working properly. I already have a custom dialect > (inherits from the SQL Server 2008 one) to register a few custom > functions that I make use of. Do I have to map coalesce or isnull as > custom functions here? If so, how is that accomplished? > > Below is my hql statement; any help would be very much appreciated. > > select a.Id as Id, a.Name as Name, > coalesce(ac.Id,0) As CategoryId, > coalesce(ac.Name,'') As CategoryName > from Activity as a > left outer join a.Category as ac > > Cheers, > > Dan -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
