File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections ;
3
3
using System . Collections . Generic ;
4
+ using System . Linq ;
4
5
using NHibernate . Cfg ;
5
6
using NHibernate . Engine ;
6
7
using NHibernate . Persister . Collection ;
@@ -465,7 +466,7 @@ private IList PerformAssemble(
465
466
{
466
467
try
467
468
{
468
- var result = new List < object > ( cacheable . Count - 2 ) ;
469
+ var result = new List < object > ( cacheable . Count - 1 ) ;
469
470
if ( returnTypes . Length == 1 )
470
471
{
471
472
var returnType = returnTypes [ 0 ] ;
@@ -574,7 +575,7 @@ private IList GetResultFromCacheable(
574
575
575
576
private static ICacheAssembler [ ] GuessTypes ( IList cacheable )
576
577
{
577
- var colCount = ( cacheable [ 2 ] as object [ ] ) ? . Length ?? 1 ;
578
+ var colCount = ( GetResultsEnumerable ( cacheable ) . First ( ) as object [ ] ) ? . Length ?? 1 ;
578
579
var returnTypes = new ICacheAssembler [ colCount ] ;
579
580
if ( colCount == 1 )
580
581
{
You can’t perform that action at this time.
0 commit comments