-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: generateSchemaUpdateScript() doesn't skip views
PostPosted: Tue Mar 25, 2008 5:47 am 
Newbie

Joined: Tue Mar 25, 2008 5:25 am
Posts: 1
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


Top
 Profile  
 
 Post subject: Re: generateSchemaUpdateScript() doesn't skip views
PostPosted: Fri Jan 15, 2010 5:57 am 
Newbie

Joined: Fri Mar 14, 2008 4:20 am
Posts: 17
Did you find a solution? I have the same problem with Hibernate 3.3.1 GA and Oracle 10g,


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.