|Re: [teneo] Issues adding additional indexes to my entity using @Index [message #502034]
||Fri, 04 December 2009 20:38
| Martin Taal
Registered: July 2009
Hibernate does not add indexes when updating an existing schema (at least not afaik).
It is strange though that the index is not added when recreating the complete schema. I would try to enable hbm2ddl
logging to see more details.
My experience is that if the rdb schema create statements fail that hibernate will still continue/startup. So it is easy
to miss them.
Btw, support for Teneo is given on the main EMF newsgroup which I added as cc.
> I am having some difficulties adding additional indexes to my tables
> using Teneo+Hibernate. I followed the documentation and added an
> annotation to the structural feature I want indexed:
> I see that the generated hibernate file contains the index attribute but
> my table doesnt contain the additional index (myindex). Here is the
> Hibernate property mapping generated by Teneo:
> <property name="mycol" lazy="false" insert="true" update="true"
> not-null="false" unique="false" type="java.lang.String"
> <column not-null="false" unique="false" name="`mycol`"
> I also dropped the whole db to have Hibernate recreated the tables from
> scratch in MySQL but I cant seem to get the index automatically created.
> Any ideas?
> thanks in advance,
With Regards, Martin Taal
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: firstname.lastname@example.org - email@example.com
Web: www.springsite.com - www.elver.org
Powered by FUDForum
. Page generated in 0.01804 seconds