Hi Harald.
I finally had more time to dig into things deeper this morning.
I was reading your description and I came to the part about d.E.P != 1
not being equivalent to !(d.E.P == 1). As you mention, this is a bit
odd. The implied "existence" clause that allows non-existent records
in the negated case doesn't really follow the typical SQL semantics
where negating a relationship still does not include null records.
In any case, this led me to wonder how EF and Linq to SQL do it.
Turns out they use left outer joins everywhere (in fact, Linq to SQL
doesn't even optimize to inner joins for simple cases). The clauses
themselves are just written as-is, with no extra existence checks.
I'd be quite curious how llblgen handles this as well, being a
significant Linq provider. Any thoughts from the ReMotion guys?
My gut is hinting that outer joins with no existence clauses is
better, since it leads to smaller queries and sane results in most
cases.
Looking forward to hearing people's thoughts.
Patrick Earl
On Wed, Mar 30, 2011 at 3:44 PM, Harald Mueller <[email protected]> wrote:
> Hi Patrick, all -
>
> I have now, to my best knowledge, added the final version of code handling
> the || and ! operators correctly to the NH-2583 issue. I added a patch file
> (NH-2583e.diff) as well as the rationale-and-design document
> LogicalOperatorsInNHibernateLinq.txt which tries to explain everything from
> meta-considerations down to the code level.
>
> There are now 74 tests which should provide a thorough coverage of the new
> code; and all (now) 3353 tests are still green.
>
> Feel free to discuss...!
>
> Best regards
> Harald
>
>
> --
> GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
> gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
>