Open full view…

Generate entity with index annotation

Tue, 08 Jul 2014 13:50:10 GMT

Is there a way to write a template to generate entities with index annotation and get the index informations from the database? The main problem is to get the index informations from the database. I looked into the jpa_bean_with_links.vm example but can't find anything. Annotation example: @org.hibernate.annotations.Table( appliesTo = "table_name", indexes = { @Index(name="single_column_index", columnNames = "column1"), @Index(name="multi_column_index", columnNames = {"column1", "column2"}) } )

Telosys Team
Tue, 15 Jul 2014 14:23:43 GMT

There's no information about index in the model, so at the moment it's not possible to generate @Index annotations