Configuration.generateSchemaUpdateScript(...) is a nice feature to get needed database update scripts. However, in our hibernate.cfg.xml we have tables and (unmodifiable) views. So when Hibernate tries to generate the update scripts, Table.isPhysicalTable() is checked to ensure whether statements are needed or not. This succeeds, so DatabaseMetadata.getTableMetadata() is called. This fails on our views: org.hibernate.exception.SQLGrammarException: could not get table metadata: <One of our views> (root: ORA-01702: a view is not appropriate here).
Our views are marked @Immutable, but we cannot tell Hibernate (with an annotation?) it is really a view so it doesn't need update statements. How can we ensure Hibernate skips views when generating update statements?
Hibernate version: 3.2.6.GA
Name and version of the database you are using: Oracle, version: Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
|