You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hql="select lower(an.Description) from Animal an group by lower(an.Description) having lower(an.Description)='abcdef'";
604
-
lresult=s.CreateQuery(hql).List();
608
+
if(Dialect.SupportsHavingOnGroupedByComputation)
609
+
{
610
+
//test only parser
611
+
hql="select lower(an.Description) from Animal an group by lower(an.Description) having lower(an.Description)='abcdef'";
612
+
lresult=s.CreateQuery(hql).List();
613
+
}
605
614
}
606
615
}
607
616
@@ -701,66 +710,72 @@ public void Cast()
701
710
Assert.That(l[0],Is.TypeOf(typeof(double)));
702
711
}
703
712
704
-
// Rendered in HAVING using a property
705
-
hql="select cast(a.BodyWeight as Double) from Animal a group by cast(a.BodyWeight as Double) having cast(a.BodyWeight as Double)>0";
706
-
l=s.CreateQuery(hql).List();
707
-
Assert.AreEqual(1,l.Count);
708
-
Assert.That(l[0],Is.TypeOf(typeof(double)));
709
-
710
-
// Rendered in HAVING using a property in an operation with costants
711
-
hql="select cast(7+123.3-1*a.BodyWeight as int) from Animal a group by cast(7+123.3-1*a.BodyWeight as int) having cast(7+123.3-1*a.BodyWeight as int)>0";
712
-
l=s.CreateQuery(hql).List();
713
-
Assert.AreEqual(1,l.Count);
714
-
Assert.AreEqual((int)(7+123.3-1*1.3d),l[0]);
715
-
716
-
// Rendered in HAVING using a property and named param (NOT SUPPORTED)
717
-
try
713
+
if(Dialect.SupportsHavingOnGroupedByComputation)
718
714
{
719
-
hql="select cast(:aParam+a.BodyWeight as int) from Animal a group by cast(:aParam+a.BodyWeight as int) having cast(:aParam+a.BodyWeight as int)>0";
0 commit comments