On 7 nov, 15:47, Sandro Micael <
sandromic...@gmail.com> wrote:
> I'm running exactly the same code in my computer and on the server. Then why
> is it working in one and not on the other?
>
> The error message is standard message NHibernate throws when you're trying
>
>
>
> > to access lazily-loaded collection after you close the session.
> > There must be something you're doing differently.
>
> > Krzysztof
>
> > Dryadwoods wrote:
>
> > In the controller I'm doing something like:
>
> > MyObject myObj = MyObject.Find(id);
> > Return(myObj)
>
> > Then in the view I'm trying to access some "child attribute":
>
> > <%=
Model.MyChild.Name %>
>
> > Initializing[......]-failed to lazily initialize a collection of
> > role: ........ , no session or session was closed
> > Exception Details: NHibernate.LazyInitializationException:
>
> > This is happening on my hosting provider's server. In localhost this
> > is working without problems,
>
> > Any ideas?
>
> > Thanks
>