Hibernate:以编程方式添加索引
如何将索引添加到属性的数据库列定义中 伪代码将类似于Hibernate:以编程方式添加索引,hibernate,jpa,Hibernate,Jpa,如何将索引添加到属性的数据库列定义中 伪代码将类似于 //Iterate through the mappings of all persistent classes. if(entityClass instanceOf MyClass) { // get version property of the class // make sure an index is added in the schema for that column } 可能吗?我使用JPA和Hibernate作
//Iterate through the mappings of all persistent classes.
if(entityClass instanceOf MyClass) {
// get version property of the class
// make sure an index is added in the schema for that column
}
可能吗?我使用JPA和Hibernate作为持久性提供者使用SQL。Hibernate不是改变数据库结构的合适工具。我正在使用Hibernate的模式生成器创建SQL模式。