I've solved the problem, is the lazy option. Setting to true, my problem is solved.
Happens in that way: It brings a list of RightProfiles, then a list of Users. Ok until that. The problem occurs when NHibernate began searching for each User associated to each Right Profiles. This is unnecessary, because User already has a list of RightProfiles. Thanks for you attenttion :) Em quarta-feira, 11 de abril de 2012 15h21min52s UTC-3, Oskar Berggren escreveu: > > Den 11 april 2012 16:58 skrev Gustavo Souza Goncalves > <[email protected]>: > > > So, our situation is: > > > > We're developing a Window. In this window, we have 2 grids. A grid for > > users, and a grid for Groups. There's another window, where one grid is > for > > Groups, and another grid for permissions. But that's not the point. I've > > quoted this because of Resources idbag. > > > > When this window is loaded, our viewModel start makes the necessary > queries > > to bring data. The first query bring all users, and inside the Users, we > > have a List of RightProfiles, containing all data necessary to populate > our > > other grid. So far, so good. > > Our problem is, nhibernate start making queries, bringing all Users of > all > > RightProfiles. > > > > He cannot do that! > > > > Our first part is running ok, we search for users, search for > RightProfiles > > (to populate the grid), and then , we mark what user is allowed to, > inside > > that grid. OK until that. > > Our problem is after that, Nhibernate searches again by inverse. > > I'm somewhat confused about what sequence of steps your code performs. > What is the exact sequence of operations that trigger the unwanted > queries? > > > /Oskar > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To view this discussion on the web visit https://groups.google.com/d/msg/nhusers/-/8aEf6NG46bkJ. 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.
