Having difficulty with specific Future query and collections with nHibernate?

I cant really understand what your use case is. Why do you only need the first 12 Steps of each Path? What about batches of Steps to process.

I cant really understand what your use case is. Why do you only need the first 12 Steps of each Path? What about batches of Steps to process IList pathIds; while ((pathIds = QueryOver.For() .

Where(...) . Projection(path => path. Id) .

SetmaxResults(100)). Count > 0) { int batch = 0; const int batchsize = 600; IList steps; while ((steps = Session.QueryOver() . Where(step => step.Path.Id).

In(pathIds) . Where(step => step....) . SetFirstResult(batch * batchsize) .

Take(batchsize) .List()). Count > 0) { DoSomething(steps); batch++; } }.

The 12 was an arbitrary number to simply represent that I need to be able to select a limited number. – Ciel Aug 1 at 8:26 Well, this approach does take just the rows needed, but it doesn't bring them forward in the actual model returned, so when something iterates over the Path. Steps it still ends up lazy loading them... – Ciel Aug 1 at 8:27 Well, I went back to this again and tried some more things, so let me see if I understand what you are suggesting exactly.

You are saying I should A Perform a Projection for my Path. Id collection, then B just do queries based on those ids? This does get me the desired tables in a clean and efficient manner, but how do I go about wiring that up so that I am not affected by the Lazy Loading of accessing the Path.

Steps? – Ciel Aug 1 at 9:26 @Stacey I don't think Nbernate knows that all steps for a given Path is already loaded after several batches. It always has to ask the Db to know that it knows all steps for a Path.

I cant think right now for a solution to get both paged data and full Path-objects in on step. To prevent lazy loading the best way I know of is QueryOver.For(). Fetch(p => p.

Steps); – Firo Aug 1 at 11:12.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions