I have a application that uses several tables, I would like to change one table for a view that contains the same columns and data types, must I to change the application code (hibernate mapping files, daos etc) or hibernate not disting a table from a view. Suppose that the table and the view are identical.
For example, I develop a application that use a table named APP_TABLE. The application is finished and works perfect, but one day I need to change the APP_TABLE for a view that contains the same data and types (maybe with additional columns but not revelavant)
Must I to change the existing application or the application can work with the view without touch any line of previous code??
but if I change a table in the data base for a view (with the same structure, colums and data type), can I use the same mapping file or need to change it for use a view ? I dont know if for Hibernate is the same use a view or a table. Consider the following task:
1) create a table and a hibernate mapping file for that table
2) develop an application that use this table
3) drop the table in database and create a view that has the same columns and data type, considere an updatable view
4) Can I use the old code with the view ??