Okay, I see. The problem is just that the bug isn't reproducible with NHibernate alone. How can I report a bug, that is not in NHibernate itself. What I don't understand is, why the NHibernate Facility is breaking the correct behavior of NHibernate? Shouldn't it be working transparently?
Kenneth On Wed, Apr 6, 2011 at 07:09, Maximilian Raditya <[email protected]> wrote: > 2011/4/6 Kenneth Siewers Møller <[email protected]> > >> The NHibernateFacility version 2.0 RC breaks the Query<> API of >> NHibernate. I can do QueryOver<> but Query<> throws a >> NullReferenceException. >> > > > It seems it's a bug in NHibernate LinqExtensionMethods implementation. If > you take a look at LinqExtensionMethods.Query<T>(this ISession) > implementation in NHibernate souce code, it's currently implemented like > this: > > public static IQueryable<T> Query<T>(this ISession session) > { > return new NhQueryable<T>(session as ISessionImplementor); > } > > > when it should be implemented like this: > > public static IQueryable<T> Query<T>(this ISession session) > { > return new NhQueryable<T>(*session.GetSessionImplementation()*); > } > > > The explanation is that in NHibernate SessionImpl, it inherits from > ISessionImplementor, while in NHibernateFacility SessionDelegate, it doesn't > inherit from ISessionImplementor. That's why when SessionDelegate cast back > to ISessionImplementor, it became null. > > I think this bug should be reported in here: http://jira.nhforge.org. > > > > > -- > Regards, > > Maximilian Haru Raditya > > -- > You received this message because you are subscribed to the Google Groups > "Castle Project Development List" 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/castle-project-devel?hl=en. > -- Med venlig hilsen / Kind regards Kenneth Siewers Møller -- You received this message because you are subscribed to the Google Groups "Castle Project Development List" 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/castle-project-devel?hl=en.
