Thanks Fabio for pointing me towards the Dialect. Yes I did change the dialect from 2000 to 2005 when I upgraded from 1.2 to 2.0. Still don't understand why you would need Row_Number in SQL 2005 to put limits on a query. Anyways, my point of using the 2005 Dialect was so that I can upgrade eventually to SQL 2008 server.
Also, I mentioned New_Id in my second post since I thought New_Id would probably cause NHibernate to do a Row_Number, but even after removing that I was still getting Row_Number in NHibernate logs. Hence I said the "simplified version" in the first post. Anyways, so this brings up two questions: 1. Can I use 2000Dialect with SQL server 2008 ? Also it would be great if you can point me towards some documentation on the Dialects. 2. Can I use New_Id without using Direct sql from NHibernate ? - AB On Feb 11, 1:47 pm, Fabio Maulo <[email protected]> wrote: > 2009/2/11 Garfield <[email protected]> > > > > > Also in the method where I call the CreateSQLQuery I have: > > sqlQuery.SetMaxResults(5); > > As I said, what you wrote in the first post, was not the only thing you are > doing... > Ok. > You are using MsSQL2005Dialect and you are setting limits for your query. > The Dialect are managing limits in some way (it has less bugs in trunk). > If you don't like MsSQL2005Dialect you can inherits from it and change it or > you can use the MsSQL2000Dialect. > > BTW ... in the second post you are talking about NEWID() and in the query > you sent in the first post there is not a "NEWID". > If you need help, please, try to be more clear as possible. > Thanks. > > 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 -~----------~----~----~----~------~----~------~--~---
