-
Notifications
You must be signed in to change notification settings - Fork 931
Fix NRE in linq processing of custom components #2941
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
Changes from 2 commits
89061f2
6321fe0
5b5a47e
f21b1b2
62e11d3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -272,6 +272,18 @@ public void NestedComponentPropertyCastTest() | |
o => o?.Name == "component[OtherProperty1]"); | ||
} | ||
|
||
[Test] | ||
public void CompositePropertyTest() | ||
{ | ||
var query = session.Query<Glarch>().Select(o => o.Multiple.count); | ||
AssertSupported( | ||
query, | ||
typeof(Glarch).FullName, | ||
"Multiple.count", | ||
o => o is Int32Type, | ||
o => o?.Name == typeof(MultiplicityType).FullName); | ||
} | ||
|
||
[Test] | ||
public void ManyToOneTest() | ||
{ | ||
|
@@ -807,7 +819,7 @@ private void AssertResult( | |
Assert.That(() => expectedMemberType(memberType), $"Invalid member type: {memberType?.Name ?? "null"}"); | ||
Assert.That(() => expectedComponentType(componentType), $"Invalid component type: {componentType?.Name ?? "null"}"); | ||
|
||
if (found) | ||
if (found && (componentType == null || componentType.PropertyNullability != null)) | ||
|
||
{ | ||
Assert.That(_tryGetMappedNullability(Sfi, queryModel.SelectClause.Selector, out var isNullable), Is.True, "Expression should be supported"); | ||
Assert.That(nullability, Is.EqualTo(isNullable), "Nullability is not correct"); | ||
|
Uh oh!
There was an error while loading. Please reload this page.
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.
I am not sure why those changes occur. Let's get rid of them, if that is not an unstable generation artifact.
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.
I think I just made some whitespace changes for #2772 and forgot to regenerate async code.