Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I investigated the issue and it seems like Denis is right. From looking at the class <code>Index</code> from the current hibernate implementation (cf. <a href="https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/mapping/Index.java%5d" rel="nofollow">1</a>), it becomes clear that specification of index types is not supported, yet.</p> <pre class="lang-java prettyprint-override"><code>public static String buildSqlCreateIndexString( Dialect dialect, String name, Table table, Iterator&lt;Column&gt; columns, java.util.Map&lt;Column, String&gt; columnOrderMap, boolean unique, String defaultCatalog, String defaultSchema ) { StringBuilder buf = new StringBuilder( "create" ) .append( unique ? " unique" : "" ) .append( " index " ) .append( dialect.qualifyIndexName() ? name : StringHelper.unqualify( name ) ) .append( " on " ) .append( table.getQualifiedName( dialect, defaultCatalog, defaultSchema ) ) .append( " (" ); while ( columns.hasNext() ) { Column column = columns.next(); buf.append( column.getQuotedName( dialect ) ); if ( columnOrderMap.containsKey( column ) ) { buf.append( " " ).append( columnOrderMap.get( column ) ); } if ( columns.hasNext() ) buf.append( ", " ); } buf.append( ")" ); return buf.toString(); } </code></pre> <p>The most simple workaround is to call <code>session.createSQLQuery()</code> and to issue <code>CREATE INDEX</code> yourself. This however, is a database-specific operation that needs to be maintained by the applications developer (in case the database is changed).</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload