I am trying to create database indexes in a table. (The indexes that I am trying to create are not being created).
Hibernate version: 3.0
Name and version of the database you are using: MySQL version 4.1.10
Mapping documents:
Code:
<!-- DESCRIPTION -->
<class name="Description" table="description">
<id name="id" unsaved-value="null" type="string" length="32">
<generator class="uuid"/>
</id>
<version name="version" type="long" unsaved-value="null"/>
<property name="type" type="string" not-null="true" index="type_index"/>
<property name="text" type="string" length="65536"/>
<any name="entity" id-type="string" meta-type="string">
<meta-value class="Product" value="PRODUCT"/>
<column name="entityType" not-null="true" index="entityType_index"/>
<column name="entityId" not-null="true" index="entityId_index"/>
</any>
</class>
When I go to the mysql prompt and execute this:
Code:
show index from description;
I get the following:
Code:
+-------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
+-------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
| description | 0 | PRIMARY | 1 | id | A | 0 | NULL | NULL | | BTREE | |
+-------------+------------+----------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
The indexes I am trying to create by specifying the index attribute on the property and the two column elements is not being created? Am I missing something here?