• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to auto generate Oracle Tables and Sequences?

 
Eric Ford
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using JPA 2 with HibernatePersistence as the provider. I have no problems working with existing objects but cannot get schema updates to work.

In my persistence.xml properties I have "<property name="hibernate.hbm2.ddl.auto" value="update"/>" but when I test a new entity class without an existing table I get a BatchUpdateException indicating the "table or view does not exist". If I add the table to the database manually then everything works. I've tried setting the ddl.auto value to "create" but the result was the same.

The database "user" account is defined with DBA role permissions as well as SYSTEM "create" permissions for tables, views, indexes, and sequences.

I've got to be overlooking something but cannot figure out what that might be. Any tips would be appreciated. I've done this before with MySql without a problem but Oracle is new to me.

 
Eric Ford
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Disregard. It seems the problem was too obvious to catch while staring at it. I had an extra "." in the property name - shoulda been "hbm2ddl" instead of "hbm2.ddl".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic