I originally reported this bug

https://nhibernate.jira.com/browse/NH-2167

it says it was fixed 2 months ago.


On Nov 10, 2015 10:57 AM, "Koen Dobbels" <koen.dobb...@gmail.com> wrote:

> Dear,
>
> I'm currenty trying to get the following statement out of nhibernate using
> criterias:
> SELECT coalesce(this_.number, '') FROM TABLE this_ GROUP BY
> coalesce(this_.number, '')
>
> I have the following code:
>  projections.Add(Projections.GroupProperty(Projections.SqlFunction("COALESCE",
> NHibernateUtil.String, Projections.Property("Number"),
> Projections.Constant(string.Empty))));
>
> The result is however quite disappointing as the result is:
> SELECT
>         coalesce(this_.number, '')
>     FROM
>         TABLE this_
>     GROUP BY
>         coalesce(this_.batch_number, ?);
>     @p0 = '' [Type: String (4000)]
>
> I've no idea where the '?' is originating from or how to solve this issue.
>
> The NH version that is used is : 3.3.1.4000
>
> Any help would be appreciated.
>
> Kind regards,
> Koen
>
> P.S. The query above is part of a much larger query, but the issue is also
> encountered with this easy query as well.
>
> --
> You received this message because you are subscribed to the Google Groups
> "nhusers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nhusers+unsubscr...@googlegroups.com.
> To post to this group, send email to nhusers@googlegroups.com.
> Visit this group at http://groups.google.com/group/nhusers.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nhusers+unsubscr...@googlegroups.com.
To post to this group, send email to nhusers@googlegroups.com.
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.

Reply via email to