Java Mailing List Archive

http://www.gg3721.com/

Home » the NHibernate development list »

Re: [NHibernate-development] [nhusers] Re: Subquery in From Clause

James Kovacs

2008-07-08

Replies: Find Java Web Hosting

Author LoginPost Reply
Moving this over to the development list...

From my perspective, we have two too many ways to translate a query into SQL already - HQL, Criteria, and NHish SQL. Each have their own codebase to translate a query into SQL, which is bad. Imagine if LINQ translated directly to SQL rather than via Criteria. Every new query feature would require 4 different, divergent implementations. I've said it before, but NHibernate really needs an AST that HQL, Criteria, and LINQ can be translated to. I personally am not familiar enough with compiler theory to make this happen at the moment. I know Fabio spent a lot of time on it, as have Aaron and Oren, and it's a tough problem. I hate to re-open the AST can-of-worms, but I think this issue must be seriously addressed in the NH 2.1 timeframe. (Then again, I've got no voting rights as I'm not a committer. So feel free to ignore my rantings.)

James
--
James Kovacs, B.Sc., M.Sc., MCSD, MCT
Microsoft MVP - C# Architecture
http://www.jameskovacs.com
jkovacs@post.harvard.edu
403-397-3177 (mobile)

On Tue, Jul 8, 2008 at 5:12 PM, Fabio Maulo <fabiomaulo@gmail.com> wrote:
We can continue to add features to CriteriaAPI but, for me, CriteriaAPI is not the way to work allow NH to work with LINQ.
So far NH have 3 way to query entities:
1) HQL
2) Criteria
3) SQL (nh-style)

Each way is parsed and translated to a SQL query.
I don't understand why for LINQ we need an additional step like LINQ->Criteria->SQL.

BTW this is a matter to talk in NH-development-list.
--
Fabio Maulo

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "nhusers" group.
To post to this group, send email to nhusers@googlegroups.com
To unsubscribe from this group, send email to nhusers-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Nhibernate-development mailing list
Nhibernate-development@(protected)
https://lists.sourceforge.net/lists/listinfo/nhibernate-development
©2008 gg3721.com - Jax Systems, LLC, U.S.A.