I've got an object named MyObject which contains a foregin relation to the object FooBar. MyObject is mapped with lazy enabled to improve loading time. When I receive a collection of MyObject, shown in the code below, I get this error "Could not initialize proxy - no Session".
I've tried to use NHibernateUtil.Initialize, but can't get it to work. How do I load the foreign object into the collection without disabling laze loading. IList<MyObject> objs= session.CreateCriteria(typeof (MyObject)).List<MyObject>(); I would like to get objs[0].FooBar.Name --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
