But why would anyone want to run such a query?
It is exactly the same as "select count(a) from Animal a"!
If you want to make sure that some column is not null, just add a "where
a.Description is not null" clause.
RP
On Monday, April 21, 2014 10:34:07 AM UTC+1, Manuel Diego Lara Huiza wrote:
>
> Hi Guys,
> I was trying to create an issue in to report a bug through JIRA dashboard
> with my account, but I didn't see any link / button for making a newone.
> So, the bug I found is when I try to use a scalar function into aggregate
> function, in particolar count() function.
> This is a test I've prepared:
>
> [Test]
> public void AggregateDistinctCount()
> {
> using (ISession s = OpenSession())
> {
> Animal a1 = new Animal("a1", 20);
> Animal a2 = new Animal("a2", 10);
> s.Save(a1);
> s.Save(a2);
> s.Flush();
> }
> using (ISession s = OpenSession())
> {
> // Count in select
> object result = s.CreateQuery("select
> count(concat(a.Description,'number')) from Animal a").UniqueResult();
> Assert.AreEqual(typeof(long), result.GetType());
> Assert.AreEqual(2, result);
> }
> }
>
>
> This test method can be paste into HqlFunctions.cs into NHibernate.Test
> project.
>
>
> I understand the problem is generated from HqlParser.cs file, method
> *HqlParser.selectFrom_return selectFrom().*
>
>
> Anyone can help me, or maybe Can i receive instructions for making a new bug
> issue ??
>
>
> Thanks a lot.
>
>
>
> Manuel Lara
>
>
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/d/optout.