> The main difference between LINQ and HQL is that HQL was designed to be
> translated to SQL.
> We have to design our systems to use the best query-tool for a specific
> task.
> I'm working with NH3 in production with more than one project using HQL,
> QueryOver, LINQ, H-SQL, SQL and even Criteria (variable no strongly typed
> queries).
> We don't have to limit our possibilities (EQO is with me ;) )

        It's also not wise to limit a query api to just Linq, as you can't
express all queries in linq, for example a simple join with an ON clause
using an expression other than an equality operator is not possible: you've
to revert to cross joins with a where clause, which not always can be
optimized properly by the RDBMS compared to an ansi join. This is IMHO als
one of the more cumbersome aspects of MS' O/R mappers and one which is often
ignored by bookwriters/speakers, I wonder why ;)

                FB

> 
> --
> Fabio Maulo
> 
> 
> El 18/07/2010, a las 07:48, Richard Birkby <[email protected]> escribió:
> 
> > On 18 Jul 2010, at 11:34, Frans Bouma <[email protected]> wrote:
> >>
> >> One could argue to always do an FKSide LEFT JOIN PKside, even if the
> >> fk side has no nullable fk fields, though it might be an RDBMS can
> >> optimize the INNER JOIN better than the LEFT JOIN.
> >
> > Yes - SQL compact will not rearrange tables in a queryplan when it has
> > an outer join. Ironically, i've used this fact to force a more optimal
> > queryplan by using an outer join in HQL.
> >
> > Richard

Reply via email to