Cacheable QueryOver with a Join and a Transformer
(Transformers.DistinctRootEntity in my case) crashes with the error "Index
was outside the bounds of the array". I've investigated a little bit into
the sources and found it happening in the
method NHibernate.Type.TypeHelper.Disassemble (see the bold line):
public static object[] Disassemble(object[] row, ICacheAssembler[] types,
bool[] nonCacheable, ISessionImplementor session, object owner)
{
object[] disassembled = new object[row.Length];
for (int i = 0; i < row.Length; i++)
{
if (nonCacheable != null && nonCacheable[i])
{
disassembled[i] = LazyPropertyInitializer.UnfetchedProperty;
}
else if (row[i] == LazyPropertyInitializer.UnfetchedProperty || row[i] ==
BackrefPropertyAccessor.Unknown)
{
disassembled[i] = row[i];
}
else
{
* disassembled[i] = types[i].Disassemble(row[i], session, owner);*
}
}
return disassembled;
}
As long as *types.length < row.length* it's quite obvious to trigger
the "Index was outside the bounds of the array" exception. I couldn't find
any discussion on this problem and I'm a little bit confused about how I
use NHibernate. Isn't it common to have a query with a Join and a
Transformer Cached?
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/nhusers/-/3sD5Ulls-dwJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.