1
votes

I have an interactive grid based on materialized view. Query is very simple SELECT * FROM MY_MATERIALIZED_VIEW. I added a few columns to the materialized view and refreshed it. Then I refreshed the APEX page but the new columns are not showing up. Is there something I am doing wrong or do I need to manually add those columns to the grid on APEX side and select the source as database column?

1

1 Answers

2
votes

As far as I can tell, it is the second option you mentioned. Apex uses the "old" materialized view definition for the page and is unaware of any changes you've made. It displays the old layout. However, it would break if you added a NOT NULL column and tried to save a newly added row to the current grid.

So, yes - you'll have to add those columns manually. Or, if the interactive grid is simple enough (i.e. you didn't do much changes), maybe it would be simpler to remove this region and create a new one using the wizard.


As Patrick commented (better to keep it here than in the comment), newest (18.x and above) Apex versions offer a nice option: synchronize columns, available in the context menu when right-clicking interactive grid's node. It will add newly added columns to the interactive grid so - you don't have to recreate the region.