-
Notifications
You must be signed in to change notification settings - Fork 933
NH-3951 - support of .All as query result. Test cases, fix and refactoring #556
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a014f6a
to
81e84ab
Compare
As for 555 pull, I do not understand how my changes may relate to the Oracle 32 failing cases. (Edit: now I have seen the message on nhibernate development about troubles with DTC, causing those failures with Oracle 32, unrelated to pull request changes.) |
@@ -53,11 +61,6 @@ public IntermediateHqlTree(bool root) | |||
|
|||
public ExpressionToHqlTranslationResults GetTranslation() | |||
{ | |||
if (_isRoot) | |||
{ | |||
DetectOuterExists(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now handled in ProcessAny result operator.
tree.AddWhereClause(tree.TreeBuilder.BooleanNot( | ||
HqlGeneratorExpressionTreeVisitor.Visit(resultOperator.Predicate, queryModelVisitor.VisitorParameters). | ||
ToBooleanExpression())); | ||
public class ProcessAll : IResultOperatorProcessor<AllResultOperator> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was formatted with spaces, got formatted with tabs.
Looks legit |
e06627f
to
5d3192e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
…toring .Any as final result for avoiding HQL tree inspection.
5d3192e
to
9a5f3c0
Compare
Rebased and squashed. |
Implements NH-3951.
This allows calls such as
session.Query<Entity>().All(e => someCondition))
, instead of having to work-around with!session.Query<Entity>().Any(e => !someCondition))
.Support of the
Any
case was using some "after-thought" tree inspection, I have simplified it by handling it in theProcessAny
result operator processor. This has required exposing the_isRoot
member ofIntermediateHqlTree
through anIsRoot
getter, in order to avoid compromising usages ofAny|All
as sub-queries.Of course, all test cases continue to pass. (Excepted the
DtcFailuresFixture.Can_roll_back_transaction
which has an unrelatedTearDown
issue (not closing its connection), which occurs on my setup without my changes too.)I would like to be able to go on fixing NH-3850 with changes done by this NH-3951.