[nhusers] Re: Generic version of Session.Load() is useless when lazy loading?

2009-10-14 Thread Remco Ros
Hi Fabio, That is how I currently handle it in our dao's: public TProxy LoadTEntity, TProxy(object id) { return (TProxy) session.Load(typeof(TEntity), id); } Remco On Oct 12, 7:49 pm, Fabio Maulo fabioma...@gmail.com wrote: It seems to be a feature request:session.LoadTMappedClass,

[nhusers] Re: Generic version of Session.Load() is useless when lazy loading?

2009-10-14 Thread Fabio Maulo
well done. 2009/10/14 Remco Ros r@rawsoft.nl Hi Fabio, That is how I currently handle it in our dao's: public TProxy LoadTEntity, TProxy(object id) { return (TProxy) session.Load(typeof(TEntity), id); } Remco On Oct 12, 7:49 pm, Fabio Maulo fabioma...@gmail.com wrote: It

[nhusers] Re: Generic version of Session.Load() is useless when lazy loading?

2009-10-12 Thread Skafa
I ran in this exact same issue. You cannot use the generic version of Load in combination with specifying a proxy for your class. If you think about it for a second, it does make sense. The generated proxy does not implement (override) your mapped class. It implements the proxy you specified.

[nhusers] Re: Generic version of Session.Load() is useless when lazy loading?

2009-10-12 Thread Fabio Maulo
It seems to be a feature request:session.LoadTMappedClass, TProxy(object id) 2009/10/12 Skafa r@rawsoft.nl And, ofcourse, you should do the casting yourself: var skill = (ISkill) session.Load(typeof(Skill), id); On 30 sep, 07:16, Richard Dingwall rdingw...@gmail.com wrote: I have the