Skip to content
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

Use Shadow property index when generating Shadow values buffer #18371

Merged
merged 2 commits into from
Oct 15, 2019

Conversation

smitpatel
Copy link
Contributor

Shadow Values factory expects a value buffer which also has slots for shadow navigations. But when populating we did not consider them. So we got a value buffer with values in wrong slots.
It happens only for ModelSnapshot (the shadow model phase) when seeding derived type when base type has a navigation.

It throws NRE if encounter null value for non-null field
or ICE if encounter different type then expected.

Resolves #17851

@@ -7948,6 +7948,150 @@ public void Create_table_handles_same_name_but_different_schemas_and_identifying
});
}

[ConditionalFact]
public void Construction_of_shadow_values_buffer_account_for_shadow_navigations_1()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one throws NRE because null is found when reading int.

}

[ConditionalFact]
public void Construction_of_shadow_values_buffer_account_for_shadow_navigations_2()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one throws ICE because double is found when reading int.

Shadow Values factory expects a value buffer which also has slots for shadow navigations. But when populating we did not consider them. So we got a value buffer with values in wrong slots.
It happens only for ModelSnapshot (the shadow model phase) when seeding derived type when base type has a navigation.

It throws NRE if encounter null value for non-null field
or ICE if encounter different type then expected.

Resolves #17851
@smitpatel smitpatel merged commit 0a10ad7 into release/3.1 Oct 15, 2019
@smitpatel smitpatel deleted the smit/issue17851 branch October 15, 2019 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Null Reference Exception when using HasData
2 participants