-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: XDoclet <key <column index="..."/> />
PostPosted: Tue Dec 23, 2003 4:53 pm 
Regular
Regular

Joined: Wed Nov 05, 2003 10:57 pm
Posts: 96
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.