File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
NHibernate.Test/NHSpecificTest/GH2029 Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 11using System ;
22using System . Linq ;
33using NHibernate . Cfg . MappingSchema ;
4+ using NHibernate . Dialect ;
45using NHibernate . Mapping . ByCode ;
56using NUnit . Framework ;
67
@@ -33,6 +34,11 @@ protected override HbmMapping GetMappings()
3334 return mapper . CompileMappingForAllExplicitlyAddedEntities ( ) ;
3435 }
3536
37+ protected override bool AppliesTo ( Dialect . Dialect dialect )
38+ {
39+ return ! ( dialect is SQLiteDialect ) ;
40+ }
41+
3642 protected override void OnSetUp ( )
3743 {
3844 using ( var session = OpenSession ( ) )
Original file line number Diff line number Diff line change @@ -270,7 +270,9 @@ protected HqlTreeNode VisitNhSum(NhSumExpression expression)
270270 if ( nhType != null && _parameters . SessionFactory . SQLFunctionRegistry . FindSQLFunction ( "sum" )
271271 ? . ReturnType ( nhType , _parameters . SessionFactory ) ? . ReturnedClass == type )
272272 {
273- return _hqlTreeBuilder . Sum ( VisitExpression ( expression . Expression ) . AsExpression ( ) ) ;
273+ return _hqlTreeBuilder . TransparentCast (
274+ _hqlTreeBuilder . Sum ( VisitExpression ( expression . Expression ) . AsExpression ( ) ) ,
275+ expression . Type ) ;
274276 }
275277
276278 return _hqlTreeBuilder . Cast ( _hqlTreeBuilder . Sum ( VisitExpression ( expression . Expression ) . AsExpression ( ) ) , expression . Type ) ;
You can’t perform that action at this time.
0 commit comments