Re: Linq project added to core

"Chad Lee" <[email protected]> Wed, 13 Aug 2008 09:35:01 -0500
Newsgroups gmane.comp.windows.dotnet.nhibernate.devel
Message-ID <[email protected]>
My only concern is that if we pass this new expression tree to the dialect,
that is going to put a dependency on .Net 3.5 to the NHibernate core.  I
don't think we are ready for that, are we?

Whether or not the tree inherits from System.Linq.Expression or simply has a
property reference to the source System.Linq.Expression, the tree is going
to have some kind of dependency on System.Linq.  I don't see any other way
to do it, unless we decide to have 2 separate tree structures - a
linq-specific one and a generalized one in core.  Then, our linq
implementation would iteratively build up our linq-specific tree, convert
that to our tree not dependent on linq, then pass that to the dialect?

On Wed, Aug 13, 2008 at 9:12 AM, Ayende Rahien <[email protected]> wrote:

> 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
>
>

-------------------------------------------------------------------------
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