Database Views
WaveMaker provides support for importing Database Views into WaveMaker applications with some limitations.
- Views imported into Database Designer are read-only hence their metadata cannot be altered or modified i.e. no support for adding/editing/deleting of columns or their metadata.
- Views do not have a primary key, hence hibernate marks all the columns as primary keys thus making it composite key. You can overcome this situation by defining Virtual Primary Key. Know more about Virtual Primary Keys.
- If any non-numeric column is null, then the whole row is returned as an empty row. This is a limitation with Hibernate. (https://hibernate.atlassian.net/browse/HHH-177). Again, Virtual Primary Keys help you handle such situations. Know more about Virtual Primary Keys.
- Care should be taken when using Views to insert/update rows into the underlying tables, especially when the View is formed as a join of multiple tables. It is recommended that you handle such cases at the database level using triggers, etc..
- Changes made to the underlying tables are not reflected in Views automatically and since there is no provision to update a view from DB Designer, you have to manually make such updates to the View in the database and re-import the database.