Win a copy of Penetration Testing Basics this week in the Security forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate create tables,column order and indexes

Alex Armenteros
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have this setting in the hibernate.cfg.xml

<property name="">update</property>

and defined a class like this

I want to create the table at the start of the process.

But If I don't put the javax.persistence annotation, I get an exception telling me that table points to an unknown table.

Also I'd like to create the table with the columns in that order. but the table is generated with its columns in alphabetical order. (If it's pre-generated the order is respected,but I don't have that posibility)

Also Indexes are not being created.

What could be happening here?

I use Hibernate annotations 3.4.0.GA and Mysql 5.1.46
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic