As schemaexport does not generate indexes for foreign keys (in Hibernate 2.1 as it used to do in 2.0.3). schemaexport create indexes, for the foreign keys on the many side, only if the mapping includes the index attribute, as follows:
<set>
......
.......
<key>
<column name="XYZ" index="XYXINDEX"/>
</key>
........
........
</set>
Is it possible to generate this kind of mapping with XDoclet?
I tried this:
/* *
* @hibernate.set
* role="children"
* table="Child"
* lazy="true"
* cascade="save-update"
* inverse="true"
*
* @hibernate.collection-key
* column="ParentId"
*
* @hibernate.column
* name="ParentId"
* index="CHILDPARENTIDINDEX"
*
* @hibernate.collection-one-to-many
* class="com.mypackage.Child"
*/
but the tag "@hibernate.column" is ignored in the generated mapping.
mota
|