I can agree to the part that using NH in a desktop app is not so easy and informations about it are very rare. But in the end it is all manageable and i don't see why one would need to make a clone of the complete object graph. I use an approach where i can control by myself for what number of UseCases one single session should be used. So if the user wants to edit the OrderLines from an Order the used session depends from where the user did start the UseCase. If he comes from CustomerEdit one session is used for CustomerEdit, OrderEdit and OrderLineEdit. If he comes from OrdersView, a fresh Session for OrderLineEdit is used. So it is easy to "avoid applying the changes > just don't apply them." I don't know if this is the prefered way, but it works nicely for me.
2009/6/20 Gustavo Ringel <[email protected]> > If you were not looking for help but just was looking for a clone > implementation in NH you should have open a JIRA and discuss with the > developers. > If you put it here, you were asking for others opinion. > > If i offended you because i gave you my opinion i succeeded in a new way to > offend someone. > > I loved the "Last post" in your message. > > Gustavo. > > 2009/6/20 Yevhen Bobrov <[email protected]> > > >> > I really think the thread derived to something unuseful. The link you >> put >> > here is horrible.Every blog / sample application will look awful because >> you >> > are trying to put things in a real working application, not trying to >> show a >> > concept like in a sample app. >> >> I think it is arrived at something useful. It is arrived to conclusion >> that: >> 1. There is no useful NH WinForm app on the net. >> 2. Asking for help in this group will make flames and war instead of >> help. >> >> > If you are looking for N undo's on a en entity you can look for CSLA >> > framework or something like that. >> >> I'm not looking for N undo's - I'm looking for possibility from NH to >> make clone of object graph for me. If there is no such thing (and it >> seems like there is really no such support) than on - we will find >> another solution (like manual cloning). >> I don't need nor want CSLA. I want NH. >> >> > If you want to bind an entity and at the end avoid applying the changes, >> > just don't apply them. >> >> How to understand this? Do I need to have another copy of object graph >> data? And how this should be handled - manually? If I have a complex >> aggregate with you advice I need to write the same amount of code just >> for that? What if I NEED immediate changes to object so some behaviour >> can be triggered or validation run? >> >> > If what you want is NH to take care of changes then you CAN REALLY use >> the >> > links that fabio gave you because you didn't close the session when you >> use >> > CpBT and NH will know every change on the entity when you go back to >> your >> > model. >> >> I CANT REALLY use the links as there only 2 WinForm apps. Both haven't >> have more than I already have. One even in Spanish :) >> >> > I think you didn't take the time trying to understand what was done >> there, >> > and i really don't think a deep clone is something you want to apply in >> a >> > _real_ application. >> >> Gustavo, I'm doing (only) WinForms development with NH for a few years >> and know what I'm talking about. You just offended me for nothing >> without even trying understand or read the whole discussion properly. >> >> Last post ... >> >> On 20 июн, 18:15, Gustavo Ringel <[email protected]> wrote: >> > I really think the thread derived to something unuseful. The link you >> put >> > here is horrible.Every blog / sample application will look awful because >> you >> > are trying to put things in a real working application, not trying to >> show a >> > concept like in a sample app. >> > >> > If you are looking for N undo's on a en entity you can look for CSLA >> > framework or something like that. >> > If you want to bind an entity and at the end avoid applying the changes, >> > just don't apply them. >> > >> > If what you want is NH to take care of changes then you CAN REALLY use >> the >> > links that fabio gave you because you didn't close the session when you >> use >> > CpBT and NH will know every change on the entity when you go back to >> your >> > model. >> > >> > I think you didn't take the time trying to understand what was done >> there, >> > and i really don't think a deep clone is something you want to apply in >> a >> > _real_ application. >> > >> > Gustavo. >> > >> > 2009/6/20 Yevhen Bobrov <[email protected]> >> > >> > >> > >> > > BTW, Frederik talks about such kind of problem here >> > >> > >http://fgheysels.blogspot.com/2009/06/winforms-databinding-on-cancell. >> .. >> > >> > > On 20 июн, 17:38, Fabio Maulo <[email protected]> wrote: >> > > > 2009/6/20 Yevhen Bobrov <[email protected]> >> > >> > > > > Not even a single "real" WinForm application. >> > >> > > > There is no more blind than who does not want see. >> > >> > > > The second link is an Example of winForm app. >> > > > The first show more than one guys sharing their experience using NH >> in >> > > > winForm. >> > >> > > > Btw in not my problem. >> > > > Continue with your attitude, chatting without do nothing that for >> sure >> > > you >> > > > will solve *your problem*. >> > >> > > > -- >> > > > 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 -~----------~----~----~----~------~----~------~--~---
