Hi,
After upgrading to the latest version of NHibernate from 2.1.2.400, a
method hich used to work all the time is now failing in certain
situations, but not others.
The error I'm receiving is:
"Late bound operations cannot be performed on types or methods for
which ContainsGenericParameters is true."
The method that is alternately working then not working is:
return MyEntity.Relations<MyRelationship>(tx).Where(x =>
x.TypeOfRelationship == somevalue);
Tracing into the 3.2 NHibernate core, the error is coming from
NHibernate.Proxy.DefaultLazyInitializer in this method:
public object Intercept(InvocationInfo info)
{
object returnValue;
try
{
returnValue = base.Invoke(info.TargetMethod,
info.Arguments,
info.Target);
// Avoid invoking the actual implementation, if
possible
if (returnValue != InvokeImplementation)
{
return returnValue;
}
// this was my change to identify the
problem
object obj = GetImplementation();
// the error occurs on this next line
returnValue = info.TargetMethod.Invoke(obj,
info.Arguments);
}
catch (TargetInvocationException ex)
{
exceptionInternalPreserveStackTrace.Invoke(ex.InnerException, new
Object[] {});
throw ex.InnerException;
}
return returnValue;
}
The object it's attempting to invoke the method on is an instance of
the 'MyEntity' class.
Has anyone else experienced this?
I'm targeting a SQL2008 R2 database. My mapping is done with .hbm.xml
files.
Thanks for any advice.
David Montgomery
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
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.