Skip to content

No more NRE on Views cloning in CatalogCloner #243

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

Merged
merged 2 commits into from
Apr 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ChangeLog/6.0.10_dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[main] Fixed certain cases of NRE happened on Domain build due to views in extracted schema
4 changes: 3 additions & 1 deletion Orm/Xtensive.Orm/Orm/Upgrade/Internals/CatalogCloner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ private void CloneViews(Schema newSchema, Schema sourceSchema)
var newView = newSchema.CreateView(sourceView.Name);
CopyDbName(newView, sourceView);
newView.CheckOptions = sourceView.CheckOptions;
newView.Definition = (SqlNative) sourceView.Definition.Clone();
if (sourceView.Definition != null) {
newView.Definition = (SqlNative) sourceView.Definition.Clone();
}
CloneViewColumns(newView, sourceView);
CloneIndexes(newView, sourceView);
}
Expand Down