-->
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.  [ 3 posts ] 
Author Message
 Post subject: Column index for composite-element (collection of values)
PostPosted: Wed Mar 01, 2006 6:56 am 
Newbie

Joined: Wed Mar 01, 2006 6:45 am
Posts: 2
Hi,

I'm using a collection of values to keep some descriptions of an element.

Code:
<class name"Article" .....>
        ....
        <set name="descriptions" table="CAT_ARTICLE_DS" lazy="false" fetch="subselect">
            <key foreign-key="FK_CAT_ARTICLE_DS"/>
            <composite-element class="Description">
                <property name="locale" column="LOCALE" length="4"/>
                <property name="name" column="NAME" length="100"/>
                <property name="description" column="DESCRIPTION" length="1000"/>
            </composite-element>
        </set>
</class>


I would like to create a index on the ID column from the CAT_ARTICLE_DS table by using schema-update/schema-export, as our database is created in this way.

How can I declare the index in the mapping?

Thanks,
Leon


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 01, 2006 9:28 am 
Expert
Expert

Joined: Tue Dec 07, 2004 6:57 am
Posts: 285
Location: Nürnberg, Germany
As far as I know you can't define an index in a mapping file since this is very database implementation specific information that is only used for the schema export.

_________________
Please don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 01, 2006 11:14 am 
Newbie

Joined: Wed Mar 01, 2006 6:45 am
Posts: 2
It is possible. On each property you can set the index attribute, the problem with the composite-element is that you have no access to the id property.


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

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.