Re: Linq project added to core
"Ayende Rahien" <[email protected]> Wed, 13 Aug 2008 17:12:51 +0300
| Newsgroups | gmane.comp.windows.dotnet.nhibernate.devel |
|---|---|
| Message-ID | <[email protected]> |
While I admit that MSSQL2005 is the root of a lot of those issues, I think that regardless, relying on string manipulation is bad in general. You can see the same issue in other dialects, like the recent issue with from column in the Jet Dialect, etc. Having an expression tree for this, as well as a translator for this would be much easier. As a simple example, we may have Dialect.GetExpressionTreeTranslator(), where the default would rely on what we have right now, but we can override it in specific dialects to deal with things in a higher level form On Wed, Aug 13, 2008 at 5:02 PM, Fabio Maulo <[email protected]> wrote: > So far I know the only one Dialect that have so many problem with something > to translate a SQL is MS2005Dialect (I don't know another dialect with the > same problem). > I think/hope we can do all the work in LINQ2NH without take care on what we > need to pass to the Dialect to translate a query. > > On the fly: > BTW SqlString is not a simple "string". We can change SqlString to have a > "more sophisticated" representation of the SQL. > You can think in a SqlString as a tree of "SQL chunks" where each part is a > part of the final SQL. > Remember that we have some more "manipulator" of the query as HQLFunctions, > possible customHQLFunctions, the Interceptor and the Dialect. > > For now, my advise is not start changing the dialect because change > public virtual SqlString GetLimitString(SqlString querySqlString, int > offset, int limit) > mean make many others thing wired with the new translator. > > We must think in LINQ2SQL as "another way" to query NH and not "the only > way"; we can't make every thing depending on the new translator and we can't > think every thing based on the problem MS2005Dialect have to give to NH a > simple query with limits. > > Fabio. > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Nhibernate-development mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/nhibernate-development > > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Nhibernate-development mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nhibernate-development