Home > Mobile >  Hibernate annotation for Index with Btree structure
Hibernate annotation for Index with Btree structure

Time:11-25

Is there a way to tell Hibernate/JPA to make an Index but with a structure like BTree when creating the DDL from the annotations of the Entities?

The @Index annotation does not have such an option.If you have to amend the DDL generated by Hibernate in order to tell it to use a certain structure, it beats the autogeneration purpose.

CodePudding user response:

At of this time, JPA does not provide a way to specify this. I do not know if there is a Hibernate-specific way - although I could not find anything with a quick search.

For this and other reasons, I prefer to use a database tool like Liquibase, Flyway etc to manage the DB schema for anything other than trivial schemas.

  • Related