I'm having problems wrapping my head over the definition of a coloumn index 
with the XDoclet 2 hibernate plugin. I've tried:

    /**
     * @hibernate.many-to-one cascade="none"
     *                        class="com.somedomain.data.Data"
     *                        column="tid" outer-join="false"
     * @hibernate.column name="tid" index="idx_tid"
     */

which generates:

    <many-to-one outer-join="false" column="tid" cascade="none"
     name="node" class="com.somedomain.data.Data">
    <column name="tid" index="idx_tid"/>
    </many-to-one>

that looks about right ..but throws:

    org.hibernate.MappingException: column attribute may not be
    used together with <column> subelement

during the sql schema generation??


So I wondred if I'm not supposed to use the xdoclet2 @hibernate.index-column 
tag instead of the
older @hibernate.column one? making the change to:

    /**
     * @hibernate.many-to-one cascade="none"
     *                        class="com.somedomain.data.Data"
     *                        column="tid" outer-join="false"
     * @hibernate.index-column name="tid" index="idx_tid"
     */


will generate:

    <many-to-one outer-join="false" column="tid" cascade="none"
    name="node" class="com.somedomain.data.Data"/>

Which fails to speificy any index at all!? don't know what I'm doing wrong, 
the documentation suggests the first method is correct, but dosnt pass 
schema generation with the latest Hibernate 3.2.cr1. Is it a bug or am I 
doing something wrong? the tag docs are a little spartan and google isnt 
helping much here.

BTW I'm using XDoclet 2.0.5 snapshot with 
xdoclet-plugin-hibernate-1.0.4-SNAPSHOT

thanks,

-Richard



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
xdoclet-plugins-interest mailing list
xdoclet-plugins-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xdoclet-plugins-interest

Reply via email to