-
Notifications
You must be signed in to change notification settings - Fork 932
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.) |
| { | ||
| 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
gliljas
left a comment
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
Anycase was using some "after-thought" tree inspection, I have simplified it by handling it in theProcessAnyresult operator processor. This has required exposing the_isRootmember ofIntermediateHqlTreethrough anIsRootgetter, in order to avoid compromising usages ofAny|Allas sub-queries.Of course, all test cases continue to pass. (Excepted the
DtcFailuresFixture.Can_roll_back_transactionwhich has an unrelatedTearDownissue (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.