"I didn't think of making a seperate DTO. I would rather not do that but its an option. "
a separate DTO will be much easier to maintain,then trying to keep the domain object in session and managing nh session. On Sep 21, 12:40 am, Fabio Maulo <[email protected]> wrote: > well... close the session because NH does no put the session some where and > does not maintain it open, session management is on your side. > > 2009/9/20 Fregas <[email protected]> > > > > > > > Yeah NHibernate seems to be keeping the ISession around from the > > object when it first gets pulled from the db and goes into asp.net > > session. > > > I didn't think of making a seperate DTO. I would rather not do that > > but its an option. > > > Craig > > > On Sep 19, 11:43 am, Fabio Maulo <[email protected]> wrote: > > > Ok Kim... but he having another problem... the obj on HttpSession was > > never > > > detached ;) > > > > 2009/9/19 Kim Johansson <[email protected]> > > > > > Yes, use an DTO instead of the actual entity. > > > > > Fregas wrote: > > > > > We have the following situation: > > > > > > We have an NH managed object we need to put into asp.net session. > > We > > > > > want to keep making changes to the object and its child collections > > > > > but without saving it to the database. We'd then like the user to be > > > > > able to hit the save button, at which point we'd like to re-attach > > the > > > > > the object to the current http request's ISesssion and persist it > > with > > > > > nhibernate. > > > > > > Currently we keep getting "illegal attempt to associate an object > > with > > > > > two sessions" from NH. Is there a better way to do this? This is a > > > > > small, low traffic site. > > > > > > Thanks, > > > > > Craig > > > > -- > > > Fabio Maulo > > -- > Fabio Maulo --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
