Hi. I'm using Hibernate 3.2.1 in JBoss 4.0.5GA on MySQL 5.0.27.
I noticed that if hibernate.hbm2ddl.auto (in the jars persistence.xml) is set to update, no indices are created for fields annotated with @Index, even when the table itself must be created.
When I set hibernate.hbm2ddl.auto=create, the indices are created. If hibernate.hbm2ddl.auto is later set to update, the indices disappear from the database.
Is this by design? Even if so, it's problematic for me: How would I add a new @Entity with some @Index-ed fields to an existing database without losing existing data?
|