Skip to content

Commit

Permalink
Refresh views with just chosen
Browse files Browse the repository at this point in the history
The ExecuteViews feature has a bug in it where after execution the view list is populated with all views from the database, not just the chosen views.  This causes code to be generated for all the views, not just the desired ones.

This commit fixes that bug, so only the chosen views remain chosen.
  • Loading branch information
Jereme Guenther authored and niemyjski committed Nov 13, 2019
1 parent ed91b53 commit 7375399
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Source/NetTiers.cst
Expand Up @@ -1505,10 +1505,12 @@

// Now that the sql has been executed, refresh the view meta data in case in changed.
SourceDatabase.Refresh();

ViewSchemaCollection temp_templateSourceViews = templateSourceViews;
templateSourceViews = new ViewSchemaCollection();
for (int i=0; i < SourceDatabase.Views.Count; i++)
for (int i=0; i < temp_templateSourceViews.Count; i++)
{
templateSourceViews.Add(SourceDatabase.Views[i]);
templateSourceViews.Add(SourceDatabase.Views[temp_templateSourceViews[i].Name]);
}
}
catch(System.Data.SqlClient.SqlException sex)
Expand Down

0 comments on commit 7375399

Please sign in to comment.