Grid is unimportant here. Code fails whenever it is run from Console Application or Web app
On 4 Sty, 14:48, Fran Knebels <[email protected]> wrote: > What grid are you using? I had the same problem with the telerik grid when > I first started using it. That grid wants a select all linq query like > repository.findall() or a where statement and the grid adds in the > skip()/take() if you set up paging. So what I found was that nhibernate > couldn't parse the linq statement. > > On Jan 4, 2011 8:36 AM, "José F. Romaniello" <[email protected]> wrote: > > > > > there is a jira for this: > >http://216.121.112.228/browse/NH-2317 > > > do you see the same exception described there? > > > 2011/1/4 Nikodem Rafalski <[email protected]> > > >> Hi I use NHiberante to fill my web app's paged and ordered grid. It > >> was working just fine until i decided to put projection in action. > > >> This is the original, working code: > >> var data = repository > >> .Where(predicate); > >> .OrderBy(columns) > >> .Skip(amount) > >> .Take(anotherAmount); > > >> Then I've started introducing my projection and it worked fine too: > >> var data = repository > >> .Where(predicate); > >> .OrderBy(columns) > >> .Select(myProjection); > > >> I was happy that everything works so I added missing Skip and Take, > >> but stop - now Nhibernate states that Select is not supported > >> (NotSupportedException). Code: > >> var data = repository > >> .Where(predicate); > >> .OrderBy(columns) > >> .Skip(amount) > >> .Take(anotherAmount) > >> .Select(projection); > > >> It's a bug or am I doing something wrong? > > >> -- > >> 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%252bunsubscr...@googlegroups.com> > > >> . > >> 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.
