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 1
1
using System ;
2
2
using System . Linq ;
3
3
using NHibernate . Cfg . MappingSchema ;
4
+ using NHibernate . Dialect ;
4
5
using NHibernate . Mapping . ByCode ;
5
6
using NUnit . Framework ;
6
7
@@ -33,6 +34,11 @@ protected override HbmMapping GetMappings()
33
34
return mapper . CompileMappingForAllExplicitlyAddedEntities ( ) ;
34
35
}
35
36
37
+ protected override bool AppliesTo ( Dialect . Dialect dialect )
38
+ {
39
+ return ! ( dialect is SQLiteDialect ) ;
40
+ }
41
+
36
42
protected override void OnSetUp ( )
37
43
{
38
44
using ( var session = OpenSession ( ) )
Original file line number Diff line number Diff line change @@ -270,7 +270,9 @@ protected HqlTreeNode VisitNhSum(NhSumExpression expression)
270
270
if ( nhType != null && _parameters . SessionFactory . SQLFunctionRegistry . FindSQLFunction ( "sum" )
271
271
? . ReturnType ( nhType , _parameters . SessionFactory ) ? . ReturnedClass == type )
272
272
{
273
- return _hqlTreeBuilder . Sum ( VisitExpression ( expression . Expression ) . AsExpression ( ) ) ;
273
+ return _hqlTreeBuilder . TransparentCast (
274
+ _hqlTreeBuilder . Sum ( VisitExpression ( expression . Expression ) . AsExpression ( ) ) ,
275
+ expression . Type ) ;
274
276
}
275
277
276
278
return _hqlTreeBuilder . Cast ( _hqlTreeBuilder . Sum ( VisitExpression ( expression . Expression ) . AsExpression ( ) ) , expression . Type ) ;
You can’t perform that action at this time.
0 commit comments