-
Notifications
You must be signed in to change notification settings - Fork 933
#750 - AliasToBean failure, test case and fix #1380
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
{ | ||
private int _orderLineId; | ||
private Order _order; | ||
private Product _product; |
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.
Tab/spaces mixup. Needs reformat (like CTRL+K CTRL+D).
{ | ||
public class Order | ||
{ | ||
private readonly ISet<OrderLine> _orderLines; |
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.
Space formatted, should be reformatted with tabs for complying with guidelines and general formatting of NHibernate source code.
using NHibernate.Transform; | ||
using NUnit.Framework; | ||
|
||
namespace NHibernate.Test.NHSpecificTest.NH0750 |
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.
Regression introduced by 9491f57, the check on |
7c5a3fb
to
a87a23b
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.
using System.Threading; | ||
|
||
[TestFixture] | ||
public class FixtureAsync : BugTestCase |
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.
Its generation was forgotten. See this section of contributing.
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.
OOPS! It was very hectic to work with VS2017 since it keeps throwing itself into NOT RESPONDING state for my install while I add/edit/rename files in test project. Would keep it in mind if needed to write another one.
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.
No troubles. Yes VS2017 is currently quite bad at handling large projects migrated to its new csproj format. That is why I had mentioned Rider, which does quite better. But maybe things will start to be better with changes like dotnet/msbuild#2572.
About writing another one, you will need to clean your master branch. But you should do it only after this PR is closed, otherwise you will need to open a new one from a dedicated branch this time.
For cleaning, in case you need instructions, it could be something like:
- Branch away changes done on master if you want to keep them. Assuming you are currently on master,
git branch newBranch
. - Still on master, reset it hard
git reset --hard head~x
, where x is the number of commits to remove (2 currentlygit reset --hard head~2
). - Force push it to your remote
git push -f
.
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.
Thanks for the detailed instructions. I will wait for this PR to close.
} | ||
} | ||
|
||
protected override void OnTearDown() |
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.
This was missing. Deleting all data is required by our tests, otherwise it is considered as a teardown failure.
@@ -121,6 +121,10 @@ public override IList TransformList(IList collection) | |||
/// same visibility and inheritance depth.</exception> | |||
private void SetProperty(string alias, object value, object resultObj) | |||
{ | |||
if (alias == null) | |||
// Grouping properties in criteria are selected without alias, just ignore them. | |||
return; |
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.
The fix. Reintroduces the check removed here without us spotting it and questioning it.
a87a23b
to
0068255
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.
Somehow missed the rebased, was still stale, re-rebased.
…ues/750
I have created the unit test to demonstrate exception happening due to AliasToBean result transformer. The related issue is #750