ITeye博客

[Hibernate 3] Index not created by SchemaUpdate

SilverRing · 2009-09-30 16:55 · Hibernate · UP · XML · Hibernate · OpenSource · Markdown

A normal index like the one below won't get created automatically if hibernate.hbm2ddl.auto is set to [b]update[/b]. [code="xml"] [/code] If the property is a primary key or it's unique, the index will be created, however. It's a hibernate bug reported here: [url]http://opensource.atlassian.com/projects/hibernate/browse/HHH-1012[/url]. A simple solution will be creating the index locally and migrating the creation script to the live system. If you opt for hibernate.hbm2ddl.auto = [b]create[/b], all data need to be backed up as this option clears the database before reconstructing the whole schema.

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。