yeah, but it wouldn't it be a better way to track the entities? as they will actually track themselves through different sessions, althoguh there might be implications because the entities returned from nhibernate will always be proxies
i'm just curious weather this idea is doable and weather it can actually help On Fri, Sep 3, 2010 at 11:51 PM, Diego Mijelshon <[email protected]>wrote: > That basically requires changing the way NH tracks the entities... > > Diego > > > On Fri, Sep 3, 2010 at 09:47, nadav s <[email protected]> wrote: > >> would it be a nice feature if the entities will keep their previous state? >> using proxies? >> the problem is that this way all the entities will be proxies, but they >> will keep their state through different sessions >> >> >> On Fri, Sep 3, 2010 at 1:10 PM, Ricardo Peres <[email protected]> wrote: >> >>> Amir, >>> >>> The short answer is: you can't. If the entity is not attached to a >>> session, there's no way to know its original values, because >>> NHibernate entities are not self-tracking (Entity Framework 4, among >>> others, does support this). >>> What you could do is load an entity by id in another session and >>> compare the values (assuming not too many of them). >>> >>> RP >>> >>> >>> On Sep 3, 3:45 am, Amir Rasekh <[email protected]> wrote: >>> > I use short life session in my windows application, and the session is >>> > not available now. >>> > Can I use merge for detached object in new session? >>> > >>> > On Sep 1, 1:11 pm, Valeriu Caraulean <[email protected]> wrote: >>> > >>> > >>> > >>> > > You can try attach object back to session and then do the check. >>> > > Look at ISession.Merge(...) method. >>> > >>> > > On Wed, Sep 1, 2010 at 10:21 AM, Amir Rasekh <[email protected]> >>> wrote: >>> > > > Hi there, >>> > >>> > > > There is some methods for checking dirty object/property at >>> > > > >>> http://nhforge.org/wikis/howtonh/finding-dirty-properties-in-nhiberna... >>> > > > . >>> > >>> > > > Bu it works is a session lifecycle. >>> > >>> > > > If I want to check a detached object from session, How I can do it? >>> > >>> > > > Is it possible? >>> > >>> > > > thanks. >>> > > > -- >>> > > > 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]<nhusers%[email protected]> >>> <nhusers%[email protected]<nhusers%[email protected]>> >>> > > > . >>> > > > For more options, visit this group at >>> > > >http://groups.google.com/group/nhusers?hl=en. >>> >>> -- >>> 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]<nhusers%[email protected]> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/nhusers?hl=en. >>> >>> >> -- >> 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]<nhusers%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/nhusers?hl=en. >> > > -- > 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]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > -- 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.
